WinBatch Tech Support Home

Database Search

If you can't find the information using the categories below, post a question over in our WinBatch Tech Support Forum.

TechHome

Process ID

Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.

Status of Process on Remote Machine


Question:

Can I write a script that checks if a process is running on another machine on my network? How?

Answer:

See the Process extender.
AddExtender("wwprc44i.dll")


machine = "\\RemoteMachine" ;Note: the user must have the necessary access permissions.
procname = "notepad"
counterstring = StrCat(machine,"\Process(",procname,")\ID Process")

ErrorMode(@off)
dat=tGetData(counterstring,0)
ErrorMode(@Cancel)
if dat == 0
   Message(procname, "Process IS NOT running !..")
else
   Message(procname, "Process IS running..")
endif

exit

Article ID:   W15864
File Created: 2013:04:01:09:11:54
Last Updated: 2013:04:01:09:11:54