在隐藏窗口中创建进程
在任务管理器的应用程序里看不到,嘻嘻!不用API,只用我喜爱的脚本指令!
源码如下!
Private Sub Command1_Click()
Const HIDDEN_WINDOW = 12
strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\\" & 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("程序路径", Null, objConfig, intProcessID)
End Sub