While we are on the subject, I needed to scroll through every process in the system so that I can check to see if their parent process id's match my current pid. That way I can kill it. Will the following query return a list of all the processes for WMI? Thanks
For Each colItem In...
Correct me if I'm wrong but I could probably modify the sql query to look something like:
Dim objWMIService, createDate
Set objWMIService = GetObject("winmgmts:" & "{impersonationLevel=impersonate}!\\.\root\cimv2")
createDate = objWMIService.ExecQuery("Select CreationDate from Win32_Process...
Sorry bout that, primary app is the path to an executable. So it would read something like this:
Dim WshShell, primaryApp
Set WshShell = CreateObject("WScript.Shell")
Set primaryApp = WshShell.Exec(notepad.exe)
Set fso = CreateObject("Scripting.FileSystemObject")
Set file =...
Greetings,
I was wondering if anyone knows how to get the creation date of a process using it's pid? My current script reads something like:
Set fso = CreateObject("Scripting.FileSystemObject")
Set file = fso.CreateTextFile(dataFilePath, True)
file.WriteLine(primaryApp.ProcessID)
' for the...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.