Solved Checking Program Files and Program Files x86

February 4, 2013 at 13:19:25
Specs: Windows XP and 7
I wrote a batch file to check to see if a file exists and if so to remove the software and if not to install a newer version. I was only checking the Program Files x86 on 64 bit computer but now I need to check Program Files on 36 bit computers and I'm not quite sure how to go about it. Here is what have.

REM Uninstall 7.1

If NOT exist "C:\Program Files (x86)\IGC\Brava! Reader\BravaReader.exe" Goto BravaReader7.1.1.11

"C:\temp\brava_reader_71\bravareader.exe" /uninst /s /f1"C:\temp\brava_reader_71\Un-Install_Brava_Reader_71.iss"

REM =====================================================================


REM Install

"C:\temp\Brava_Reader_7_1_1_11\bravareader.exe" /s /f1"C:\temp\Brava_Reader_7_1_1_11\Install_71_setup.iss"

See More: Checking Program Files and Program Files x86

Report •

February 4, 2013 at 14:32:19
✔ Best Answer
SET pf=%programFiles%
IF DEFINED programFiles(x86) SET pf=%programFiles(x86)%
ECHO %pf%

How To Ask Questions The Smart Way

Report •

February 5, 2013 at 12:42:51
thanks razor2.3 that was much better than I was trying to go about it.

Report •
Related Solutions

Ask Question