Find Program or DLL Location and Version

WHICHCMD [-a] filename

This program displays the location and version of the program or DLL which would be loaded by Windows if started from the command session and folder in which you run WHICHCMD.  It can sometimes reveal the cause of obscure errors caused by accidentally using the wrong program or DLL version.

The filename parameter must contain the file extension .EXE, .DLL, .BAT, or .CMD.  The optional -a parameter causes the program to display all the versions found, of which the first would be the one loaded.

Note that on 64-bit systems, if your path contains a folder name redirected by Windows, such as WINDOWS\SYSTEM32, WHICHCMD will not find files in that folder (unless it happens to be the current folder).  SYSTEM32 is treated by Windows for 32-bit programs as if it was SYSWOW64.  Files in the latter folder will be found instead when SYSTEM32 is included in the path.


Finding the active version of the Dialogic Diva driver file on a 64-bit system.  Note that COPIAFACTS, being a 32-bit program, uses the copy in SysWOW64.

C:\Windows\system32>whichcmd dssdk.dll

2012/04/11 17:57:58  2048000 C:\Windows\system32\dsSDK.dll []

C:\Windows\system32>cd ..

C:\Windows>whichcmd dssdk.dll

2012/04/11 18:00:56  1441858 C:\Windows\SysWOW64\DSsdk.dll []


Finding the active version of the CopiaFacts engine:

C:\Windows>whichcmd copiafacts.exe

2014/05/31 10:50:36  5347912 C:\Program Files (x86)\COPIA\COPIAFACTS.exe []