' Create a Process in a Hidden Window
Const HIDDEN_WINDOW = 12
cmd=InputBox("Create the following process ie notepad.exe","Enter")
strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
& "\\" & strComputer & "\root\cimv2")
Set objStartup = objWMIService.Get("Win32_ProcessStartup"
Const HIDDEN_WINDOW = 12
cmd=InputBox("Create the following process ie notepad.exe","Enter")
strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
& "\\" & strComputer & "\root\cimv2")
Set objStartup = objWMIService.Get("Win32_ProcessStartup"
)
Set objConfig = objStartup.SpawnInstance_
objConfig.ShowWindow = HIDDEN_WINDOW
Set objProcess = GetObject("winmgmts:root\cimv2:Win32_Process")
errReturn = objProcess.Create(cmd, Null, objConfig, intProcessID)
Set objConfig = objStartup.SpawnInstance_
objConfig.ShowWindow = HIDDEN_WINDOW
Set objProcess = GetObject("winmgmts:root\cimv2:Win32_Process")
errReturn = objProcess.Create(cmd, Null, objConfig, intProcessID)
No comments:
Post a Comment