I am currently trying to write a .BAT file that runs a particular .exe depending on whether or not the system is 64/32 bit.
So far my code looks like this:
cd driver
SET isX=SYSTEMINFO | find /C "X64-based"
SET isY=SYSTEMINFO | find /C "X32-based"
IF isX == 1 setupX32.exe
IF isY == 1 setupX64.exe
cd ..
setup.exe
The commands work individually. It seems that there is a problem with assigning a variable while piping. because
echo %isX%
Doesn’t seem to work. Any advise would be greatly appreciated. Thankyou.
~ Dan
where exactly error is coming?
just a thought.. May be you can use %PROCESSOR_ARCHITECTURE% variable to find out the architecture instead of from SYSTEMINFO..
or instead of going for pipe, you can implement if else block/..