Click here to Skip to main content
15,881,938 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi All,

I am new to batch file and I am stuck at one point, where I want to check if the process exist in the startup or in other words if a process is installed on that machine.

I have used below command ,
1]
tasklist /fi "imagename eq abcProcess.exe" /NH

Even I used below,

2]
tasklist /fi "imagename eq abc.exe" | find /i "abc.exe" >nul && (
(
echo abc found
) || (
echo abc not found
)

Please suggest if any....
Posted
Updated 20-Nov-13 0:12am
v2
Comments
Sergey Alexandrovich Kryukov 20-Nov-13 11:52am    
Why doing such complicated things in such a rudimentary technique as batch files? Don't you have access to some "real" programming, or PowerShell. I do understand the value of batch files: they can work without any other software, but when the situation if far from being as simple, using batch becomes a hassle...
—SA
CHill60 23-Nov-13 11:53am    
In addition to SA's comment ... tasklist will only determine if the program is running, not if it is installed ... dir might be more useful, but would take some time.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900