Batch file to check program installation -
i trying determine if program has been installed and, if has, open it. if program has not been installed, alternate program should open.
for example, if notepad++ has been installed, script should open that; if not, notepad should opened instead.
any advice @ appreciated, have no idea begin.
you can try :
@echo off cls & color 0b mode con cols=90 lines=5 set location=%programfiles%\notepad++ set filename=notepad++.exe echo( & cls echo( & echo please wait moment .... searching "%filename%" on "%location%" timeout /t 3 /nobreak>nul cls if exist "%location%\%filename%" ( color 0a && echo "%filename%" installed && pause && start "" "%location%\%filename%" ) else ( color 0c & echo "%filename%" not installed & pause & start "" "notepad.exe" )
Comments
Post a Comment