Run batch file only if service exists

Reading Time: < 1 minute

@ECHO OFF
REM – Check for an existing installation of ________________________
REM – For 32 Bit Windows
if exist “C:\Program Files (x86)\app name\software.exe” goto EOF
REM – For 64 Bit Windows
if exist “C:\Program Files\app name\software.exe” goto EOF
REM Deploy SOftware
Your script goes here
REM — End of the script
:EOF

Note: You may need to reenter the speech marks after copying the script to a notepad file

Please follow and like us:

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.