anilreddygeeda
Programmer
Hello all....Guys please help me regarding a VBscript that tells whether an application is already running in the task manager. If it is running, it should not launch it again, If not, It has to launch it.....
Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
strComputer = "."
strProcessName = "Notepad"
set objWMI = GetObject("winmgmts:{impersonationLevel=impersonate}!\\" & strComputer & "\root\cimv2")
set colProcesses = objWMI.ExecQuery("Select * from Win32_Process Where Name='" & strProcessName & "'")
for each objProcess in colProcesses
intProcessID = objProcess.ProcessID
next
if (intProcessID) then wscript.echo "already running"