No, it does not.In this article I showed how to use SYSOCMGR to install Windows optional components remotely and silently. I tested the script on my XP workstation and it was working. However, when I tried to install SNMP on Windows 2003 servers, I failed.
I have found that SYSOCMGR does not work via PSEXEC. I spent two days to find the reason and the solution. I still have no idea about the reason of such behaviour, but I have the solution. This is the SCHTASKS utility, which replaced AT.exe in Windows XP and Windows 2003.
- We have a batch file containing all the commands including SYSOCMGR.
- Batch file name is REMOTE.bat
- Remote server name is WEBSERVER
- The batch file is located on the WEBSERVER server in the C:\Temp folder
- SCHTASKS /CREATE /S WEBSERVER /SC ONCE /RU “SYSTEM” /TN “My_Remote_Task” /TR “C:\Temp\Remote.bat” /ST 00:00:01
The key point here is the start time (option /ST). Start time is today but in the past. Therefore, this scheduled task will never run
- SCHTASKS /RUN /S WEBSERVER /TN “My_Remote_Task”
This is how we run our batch file
- SCHTASKS /QUERY /S WEBSERVER
This command gives us the scheduled task status. Let’s wait until the task finishes
- SCHTASKS /DELETE /S WEBSERVER /F /TN “My_Remote_Task”
And now we can delete this task
The script implementing this approach is here