Hi can i have the following format in the script. If version 7.0 is found, the script will exit, if version 8.0 is found the script will carry on with the next command line in the script?
if exist c:\Program Files\Adobe\Reader 7.0\ReaderAcroRd32.exe exit
if exist c:\Program Files\Adobe\Reader 9.0\ReaderAcroRd32.exe exit
if exist c:\Program Files\Adobe\Reader 8.0\ReaderAcroRd32.exe goto Next
:Next
Main Topics
Browse All Topics





by: SteveSheeleyPosted on 2009-06-19 at 09:39:12ID: 24667917
The code if exist [filename] command should work if you are pointing to the complete path such as:
if exist C:\Program Files\Adobe\Reader 7.0\Reader\AcroRd32.exe exit
I've tested that here on a system that had Adobe Reader 7.0 installed and it works juts fine. If the reader is installed in any other directory that the default directory then the code will not work and you'll have do some conditional checking in a for loop.