Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations John Tel on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

error 2....??

Status
Not open for further replies.

GCFII

IS-IT--Management
May 17, 2004
20
US
I have a script to launch a remote process and it seems to work for notepad.exe but when run it with ccmclean.exe I receive error 2. Does anyone know a way around this error or what it means? I have pasted the script in case this helps.

Script
-----------------------------------------------------------
strComputer = "192.168.2.10"
command1 = "C:\Tools\ccmclean.exe /q"
Set objWMIService = GetObject _
("winmgmts:\\" & strComputer & "\root\cimv2:Win32_Process")
Error = objWMIService.Create(command1, null, null, intProcessID)
If Error = 0 Then
Wscript.Echo "ccmclean was started with a process ID of " _
& intProcessID & "."
Else
Wscript.Echo "ccmclean could not be started due to error " & _
Error & "."
End If

-----------------------------------------------------------

thx
 
Thanks! This points me in the right direction.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top