Create a new process using Win32_Process WMI class
Create a new process using Win32_Process WMI class
Rate Create a new process using Win32_Process WMI class
(1(1 Vote))
Computer = "192.168.1.110"
Application = "C:\windows\system32\notepad.exe"
WorkDir = "c:\temp"
Set Process = GetObject("winmgmts://" & Computer & "/root/cimv2:Win32_Process")
Set Method = Process.Methods_("Create")
Set Param = Method.inParameters.SpawnInstance_()
Param.CommandLine = Application
Param.CurrentDirectory = WorkDir
Set Result = Process.ExecMethod_("Create", Param)
If Result.ReturnValue = 0 Then
WScript.Echo "Create process method completed successfully"
Else
WScript.Echo "Create process method failed"
End If
Create a new process using Win32_Process WMI class Comments
No comments yet — be the first to post one!
Post a Comment