When using the command line, your $PATH variable holds different paths to search when you enter a command. Today, I was using the Visual Studio 2008 command prompt, which has setup my $PATH variable to point at known locations relating to .Net and Visual Studio.
I could happily type in ‘sn’ in order to execute the program, however I had no idea where that exe lived and I needed the full path. I thought I would have to search using Windows, however I found that there is a ‘where’ command which will return you the full path for a command.
C:Program FilesMicrosoft Visual Studio 9.0VC>where sn
C:Program FilesMicrosoft SDKsWindowsv6.0ABinsn.exe
Surprisingly useful!!
Great find, thanks!
It would have been nice if this tool was listed by the “help” command.
Also, check out the description for the “pattern” argument (where /?). It has some useful features.
The reason it is not on the help because it is part of VS:
>where where
C:Program FilesMicrosoft Visual Studio 8Common7ToolsBinWhere.Exe
Robi
The where utility is included with Vista, even though you won’t find it listed in the output from “help”.
>where where
C:WindowsSystem32where.exe