Sign up ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

i want to make cmd file witch would take this command systeminfo | findstr /I type: and then save windows type (for ex. 32 bit). Then i want with IF help install winrar. For ex.: if windows are 32bit, i want that winrar would install 32 bit, if windows are 64bit - winrar 64 bit. How to do so ?

share|improve this question
what have you tried already? – gronostaj Jul 14 '13 at 11:34

3 Answers 3

up vote 1 down vote accepted

You can also use the PROCESSOR_ARCHITECTURE environment variable.

   echo Do 32-bit installation here.
) else (
   echo Do 64-bit installation here.
share|improve this answer
set /a "x64=1<<32>>32"
if %x64% == 0 echo 32 bit
if %x64% == 1 echo 64 bit

Have not really tested this on 64 bit system. Confirmation welcomed.

share|improve this answer

Ask for an input, 64 or 32 if unknown 32.

@echo off
echo 64
echo 32
echo IDK
set /p bit=
goto bit
goto %bit%
start winrar32.exe
goto done
start winrar64
goto done
echo. Installer Is running...
share|improve this answer
Also If you had done any research you would have found the above code. – Jacob Eggebeen Jul 14 '13 at 13:51

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.