I had the need to detect if a system was running 32 or 64 bit, I ended out with a solution much like the one shown below;

Just create two subdirectories called X86/X64 (X86 version in X86 and X64 in X64) and then create a install.cmd in each to install either the x86 or x64 version.

----<batchfile.cmd>---------------
@Echo off
if defined ProgramFiles(x86) goto INS64
goto INS32
:INS32
Echo 32 bit installing
call x86\install.cmd
goto END
:INS64
Echo 64 bit installing
call x64\install.cmd
goto END
:END
1 reply

Leave a Reply

Want to join the discussion?
Feel free to contribute!

Leave a Reply to kissson Cancel 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.