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
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