I am trying to find out if an OS is 32 bit or 64 bit using a batch file and then running a program based on the output. Here is what I have so far
if (systeminfo | findstr = based) == "x64-based PC" run 64-bit Program
else run 32-bit program
I keep getting "| is unexpected at this time". I have tried using a hat ^ and without parenthesis but I can't seem to get passed that error. Is there something I am missing or another way to do this. The batch file and programs will be on a flash drive and be used on multiple windows pc's. The systeminfo command is the only way I know of to get the bit result I need and I know that command works, but I need the program to look at the results and make a decision. Any thoughts would be greatly appreciated! Thanks in advance