I write the vbscript that kill excel.exe
but it shows the error message as title.
Could you please help me to solve it.
thx.
Set ArgObj = WScript.Arguments strComputer = ArgObj(0) strUser = strComputer & "\" & ArgObj(1) rem strComputer & "\" & ArgObj(1) strPassword = ArgObj(2) strNamespace = "root/cimv2" str = "" Dim objWMIService, colProcessList Set objLocator = CreateObject("WbemScripting.SWbemLocator") Set objWMIService = objLocator.ConnectServer(strComputer,strNamespace,strUser,strPassword) Set colProcessList = objWMIService.ExecQuery("SELECT * FROM Win32_Process WHERE Name = 'excel.exe'") For Each objProcess in colProcessList objProcess.Terminate() Next wscript.echo "no result yet"
Add comment