Windows: find the location of the executables

After having answered this question for Linux/Unix, I have encountered the same need for Windows. This is what I have found.

Since Windows Server 2003 (including Vista and Windows 7), you can use the “where” command. Before Windows Server 2003 and since Win 98, this command can be installed via the various “Windows Resource Kit” packages.

If you have the excellent, albeit sometimes complex, Windows Powershell installed on your computer, you can also execute the “get-command” or its shorter “gcm” alias.

My colleague, Christian Baumann (@chrissbaumann), pointed me to a third option: it exists a native port of some GNU utilities to Windows, and it includes the “which” command: However, the project doesn’t seem to be alive after 2003 and some commands in the package have issues, so while it’s a perfectly valid solution, in particular for Windows 2000/XP, I would caution a little bit its usage.

This entry was posted in Tips and tricks and tagged , , , , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s