Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.
Keywords: Environment COMSPEC CMD CMD.EXE Command Shell 32 64 32-bit 64-bit Start Launch Run RunWait ShellExecute SysNative SysWow64
How can I launch the 64-bit CMD.EXE from my 32-Bit WinBatch script?
; On a 64-bit Architecture ; By default 32-bit WinBatch launches the 32-bit CMD.EXE ; By default 64-bit WinBatch launches the 64-bit CMD.EXE Run( Environment("COMSPEC"), '' ) Exit
What if you don’t want that? Then you must explicitly run specific bitness of CMD.EXE by specifying full path name as follows:
To explicitly run the 32-bit version of a command:
cmd_32 = DirWindows(0):'syswow64\CMD.EXE' Run( cmd_32, '' ) Exit
To explicitly run the 64-bit version of a command:
cmd_64 = DirWindows(0):'Sysnative\CMD.EXE' Run( cmd_64, '' ) Exit
Article ID: W17643
Filename: CMD File Redirection.txt
File Created: 2013:05:15:13:14:06
Last Updated: 2013:05:15:13:14:06