Is Process Running
Does anybody have a script which checks if a process is running and does an output depending on that?
I.e - is xx.exe running - no do this yes do that?
I know how to do it for If Exist etc but is it possible?
If *something* process.exe goto ABC else goto EFG
That kind of thing?
set service = GetObject ("winmgmts:")
pFound = False
for each Process in Service.InstancesOf ("Win32_Process")
If Process.Name = "notepad.exe" then
pFound = True
If pFound = true then
Erm yes - although I have just realised i could simply do - taskkill process.exe then do what i want to do anyway as it doesn't make a difference if the process is killed before what i need to do!