psexec / sysocmgr scripting error

Anything VBScript-related, including Windows Script Host, WMI, ADSI, and more.
Forum rules
Do not post any licensing information in this forum.

Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
This topic is 16 years and 7 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
Locked
User avatar
rmiller75
Posts: 12
Last visit: Thu Nov 08, 2007 1:14 am

psexec / sysocmgr scripting error

Post by rmiller75 »

Ok, so i run this script & get the following error on the bolded line: Error: The System cannot find the file specifiedSource: Null

Code: Select all

RemotePC="crmiller"Set fso = CreateObject("Scripting.FileSystemObject")Set shell = Wscript.CreateObject("WScript.Shell")Set uaFile = fso.CreateTextFile("" & RemotePC & "c$snmp.ua",True)uaFile.Writeline "[NetOptionalComponents]"uaFile.Writeline "SNMP = 1"uaFile.Closeshell.run "psexec " & RemotePC & " -s -i -d sysocmgr /i:%windir%infsysoc.inf /u:c:snmp.ua /x /q", vbHide[end code]What am I missing?  Thanks for your help.
This topic is 16 years and 7 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
Locked