获取当前正执行的VBS的路径
CMD当前路径
test = createobject("Scripting.FileSystemObject").GetFolder(".").Path
Wscript.echo test
当前VBS路径
test = createobject("Scripting.FileSystemObject").GetFile(Wscript.ScriptFullName).ParentFolder.Path
Wscript.echo test
strComputer = "."
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
Set colItems = objWMIService.ExecQuery("Select * From Win32_Process Where Name = 'wscript.exe' OR Name = 'cscript.exe'")
For Each objItem in colItems
lmq=lmq & objItem.CommandLine & vbcrlf
Next
Wscript.Echo lmq