VBS获取指定进程的完整路径

2024-12-30 07:11:55
推荐回答(1个)
回答1:

strComputer = "."
Set objWMIService = GetObject("winmgmts:" _
& "{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
Set colProcessList = objWMIService.ExecQuery _
("Select * from Win32_Process Where Name = 'QQ.exe'")
For Each objProcess in colProcessList
Wscript.Echo objProcess.executablepath
Next