Package org.metricshub.wmi.remotecommand
Class RemoteProcess
java.lang.Object
org.metricshub.wmi.remotecommand.RemoteProcess
Class for the Win32 related methods.
-
Method Summary
Modifier and TypeMethodDescriptionstatic int
executeCommand
(String command, String hostname, String username, char[] password, String workingDirectory, long timeout) Execute the command on the remote
-
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 executehostname
- Hostname of IP address where to execute the commandusername
- 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 JNATimeoutException
- To notify userName of timeout.
-