Batch Snippet to Work Around SysNative x64 Re-Direct

By | December 31, 2012
Share

Here is a helpful batch snippet that can be added to the top of your batch to simply make x32 batches compatible with x64 systems.

If "%PROCESSOR_ARCHITECTURE%" EQU "x86" (
    If exist "%SystemRoot%\SysWOW64" (
        "%SystemRoot%\sysnative\cmd.exe" /C "%~dpnx0" %1 %2 %3 %4 %5 %6 %7 %8 %9
        exit
    )
)

-BG

Leave a 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.