Command Prompt for Windows




WinOne® and 64-bit Windows

When the WinOne® Command Prompt is run on a 64-bit Windows operating system, it runs under the 32-bit sub-system called WOW64. To a 32-bit program, there appears to be two of just about everything (ie. a 32-bit version and a 64-bit version). This applies to special folders/directories, programs and even some environment variables. For example, there is two "Program Files" folders :-

  1. "Program Files" - 64-bit version
  2. "Program Files(x86)" - 32-bit version

There is also some special folders in 64-bit Windows, including :-

  1. %windir%\System32 which contains 64-bit related programs and libraries
  2. %windir%\SysWOW64 which contains 32-bit related programs and libraries
  3. %windir%\SysNative which is a hidden virtual folder

Under wow64, %windir%\System32 is redirected to %windir%\SysWOW64 automatically by Windows. If a 32-bit program requires access to the actual %windir%\System32, use the hidden %windir%\SysNative virtual folder instead.

There is also some 64-bit specific environment variables that under wow64 point to 32-bit folders. The WinOne® Command Prompt will automatically reset them back to the correct version of the folders, so that, when the environment variables are instantiated, they return the right result.

Running 32-bit or 64-bit programs under WOW64

Depending on the type of program being run (ie. text mode type (console) or GUI programs), the WinOne® Command Prompt will executable either the 32-bit or 64-bit version of a program. Use the WHICH command to display which one the WinOne® Command Prompt will run.

For text mode type (console) programs, the WinOne® Command Prompt will first look into the 32-bit folders and if the program is not found, it will then look into the 64-bit folders for the program to run.

For GUI type programs, the WinOne® Command Prompt will look into either the 32-bit or 64-bit folders, depending on the setting for the "Favour 64-bit GUI programs under WOW64" in the Program tab, in the WinOne® Command Prompt Attributes... menu option. When this option is switched on, the WinOne® Command Prompt looks first in the 64-bit folders and if not found, then it looks into the 32-bit folders. When this option is switched off, the WinOne® Command Prompt will first look into the 32-bit folders and if not found, it will look into the 64-bit folders.

The option "Favour 64-bit GUI programs under WOW64" is switched on by default, when the WinOne® Command Prompt is running on a 64-bit version of windows.