Skip to content

Windows Shell / Useful Windows Examples

This page provides examples of useful Windows use, compiled through experience developing software on Windows.


Determine if a Program is 32-bit or 64-bit

It is sometimes necessary to confirm that a program is 32-bit or 64-bit. The following approaches can be used.

  • Program Files Naming Convention
    • If the program is installed in C:\Program Files, it should by convention be 64-bit, but this is not guaranteed, especially if the program is part of a larger software suite.
    • Similarly, C:\Program Files (x86) should contain 32-bit programs.
    • Relying on naming convention does not provide certainty.
  • System Folder Naming Convention

Other options are described below.

Use Linux file Command

If a Linux shell is available, such as Git Bash or Cygwin, the file command can be used. The following example checks the cmd.exe program using Git Bash. The PE32+ plus sign indicates 64-bit.

$ file /C/Windows/System32/cmd.exe
/C/Windows/System32/cmd.exe: PE32+ executable (console) x86-64, for MS Windows

Use Task Manager

If the program can be run in a way that it stays running, it can be reviewed in the Task Manager. First select the Details tab as shown below.

64-bit-taskmgr1

Details Tab of Task Manager (see full-size image)

Most likely, the Platform column is not shown as a column. Therefore, right click on the column headings and display the following menu. Click on Select columns.

64-bit-taskmgr2

Menu to Select Details Columns (see full-size image)

Then select the Platform column, as shown below.

64-bit-taskmgr3

Menu to Select Details Columns (see full-size image)

The Details tab will then show Platform as a column and in the following example confirm that the cmd program is 64-bit. It is not clear what a blank in this column indicates.

64-bit-taskmgr4

Task Manager Details Showing Platform Column (see full-size image)