Hello Friends,
I'm able to get running process list by the following code:
I'm running a vbs file from the desktop by double-click on it. In the process list it is showing as "WScript.exe".
I want to know the vbs file path which is running in Wscript.exe. How can I do that in vb.net?
I tried WMI also (as code given below), but not getting success.
Any idea about How to get what file is running in wscript.exe or cscript.exe?
Sorry for my Bad English !
Regards,
I'm able to get running process list by the following code:
Code:
For Each p As Process In Process.GetProcesses()
Msgbox p.Modulename
NextI want to know the vbs file path which is running in Wscript.exe. How can I do that in vb.net?
I tried WMI also (as code given below), but not getting success.
Code:
Dim searcher As New ManagementObjectSearcher( _
"SELECT * FROM Win32_Process WHERE Name='WScript.exe'")
For Each process As ManagementObject in searcher.Get()
Msgbox process("CommandLine") 'it is showing a blank messagebox
NextSorry for my Bad English !
Regards,