-------------- Close the specified program ----------
Logip = "127.0.0.1" // Computer Identification User = "" // User Name Password = "" // Password AppName = "QQ.exe" // Specify the display of the program name Namespace = "root / cimv2"
WScript.echo "Strat"
SET WMILOCATOR = CreateObject ("wbemscripting.swbemlocator") set objWMI = Wmilocator.ConnectServer (Logip, Namespace, User, Password)
Set col = objwmi.execQuery ("SELECT * WIN32_PROCESS WHERE Name = '" AppName "")
For Each Colin in Colcolin.Terminate ()
Nextwscript.echo "end" script> job> ------------------------------------ ---------- Run the specified program ----------------
Logip = "127.0.0.1" // Computer Logo User = "" // User Name Password = "" // Password AppName = "QQ.EXE" // Specify the program name name Namespace = "root / cimv2"
WScript.echo "Strat"
SET WMILOCATOR = CreateObject ("wbemscripting.swbemlocator") set objWMI = Wmilocator.ConnectServer (Logip, Namespace, User, Password)
'Or' set processclass = getObject ("Winmgmts: win32_process") 'Retval = ProcessClass.create (Appname)
Set obj = objwmi.instancesof ("Win32_Proces")
Obj.create (appname)