Forum Discussion
HKosova
13 years agoSmartBear Alumni (Retired)
Hi Denis,
Two things:
1. The Win32_OperatingSystem method description says:
Two things:
1. The Win32_OperatingSystem method description says:
So, you need to add the following line to your script before calling Locator.ConnectServer:
The calling process must have the SE_SHUTDOWN_NAME privilege.
2. If the remote computer uses Windows Vista or 7, you need to obtain the Win32_OperatingSystem object in the following way:
If it uses Windows XP, you need to specify its Win32_OperatingSystem.Name property value in the Get method call, like this:
To learn this value, you can execute the following command line on the remote computer:wmic os get NameNote that you need to double the backslashes in this value when using it in the Get method call.
By the way, in TestComplete 8, it's just two lines of code using the built-in WMI.RestartComputer method:WMI.ConnectToComputer(Server, 'Administrator', '1q2w3eQAZ');
WMI.RestartComputer;
Related Content
- 7 years ago
Recent Discussions
- 4 days ago
- 4 days ago
- 7 days ago