Package org.metricshub.winrm
Class WindowsRemoteProcessUtils
java.lang.Object
org.metricshub.winrm.WindowsRemoteProcessUtils
-
Method Summary
Modifier and TypeMethodDescriptionstatic StringBuilds a new output file name, with 99.9999999% chances of being unique on the remote systemstatic CharsetgetWindowsEncodingCharset(WindowsRemoteExecutor windowsRemoteExecutor, long timeout) Deprecated.
-
Method Details
-
getWindowsEncodingCharset
@Deprecated(since="2.0.00", forRemoval=false) public static Charset getWindowsEncodingCharset(WindowsRemoteExecutor windowsRemoteExecutor, long timeout) throws TimeoutException, WqlQuerySyntaxException, WindowsRemoteException Deprecated.Not the charset of remote command output, and never was:CodeSetis the remote machine's ANSI code page, whilecmd.exewrites its output in the console (OEM) code page — the two differ on every non-English locale. Command output is now decoded withWindowsRemoteExecutor.SHELL_OUTPUT_CHARSET, the code page the remote shell is created with. Use this method only to decode data that a Windows application genuinely wrote in the ANSI code page.Get the CharSet from the Win32_OperatingSystem CodeSet. (if not found by default Latin-1 windows-1252)- Parameters:
windowsRemoteExecutor- WindowsRemoteExecutor instancetimeout- Timeout in milliseconds.- Returns:
- the encoding charset from Win32_OperatingSystem
- Throws:
TimeoutException- To notify userName of timeoutWqlQuerySyntaxException- On WQL syntax errorsWindowsRemoteException- For any problem encountered on remote- See Also:
-
buildNewOutputFileName
Builds a new output file name, with 99.9999999% chances of being unique on the remote system- Returns:
- file name
-
CodeSetis the remote machine's ANSI code page, whilecmd.exewrites its output in the console (OEM) code page — the two differ on every non-English locale.