Class RemoteProcess

java.lang.Object
org.metricshub.wmi.remotecommand.RemoteProcess

public class RemoteProcess extends Object
Class for the Win32 related methods.
  • Method Details

    • executeCommand

      public static int executeCommand(String command, String hostname, String username, char[] password, String workingDirectory, long timeout) throws WmiComException, TimeoutException
      Execute the command on the remote
      Parameters:
      command - The command to execute
      hostname - Hostname of IP address where to execute the command
      username - Username (may be null)
      password - Password (may be null)
      workingDirectory - Path of the directory for the spawned process on the remote system (can be null)
      timeout - Timeout in milliseconds
      Returns:
      the command status code
      Throws:
      WmiComException - For any problem encountered with JNA
      TimeoutException - To notify userName of timeout.