The following can be used in a batch script to check if a system is 64Bit or 32Bit.

@echo off
:START

REM SYSTEM Check
IF EXIST %WINDIR%\SysWOW64\NUL GOTO :64BIT

goto :32BIT

:64BIT
REM Run 64bit command

goto :END

:32BIT
REM Run 32bit command

goto :END

:END

Just add the appropriate code into the :64BIT or :32BIT sections.