Q. How can I determine the location of an executable file on my Windows Server 2003 system?

John Savill

July 22, 2004

1 Min Read
ITPro Today logo in a gray background | ITPro Today

A. Your Windows 2003 environment contains a PATH variable that's created by using the system path variable and a user-specific path variable. When a program resides in a folder that appears in the PATH variable, you can start the program simply by typing the executable's filename--for example, dcdiag.exe (assuming the Windows 2003 Support Tools--which include dcdiag.exe--are installed on your Windows 2003 system); you don't have to precede the executable name with the full pathname if the pathname is part of the PATH variable. You can check your PATH variable by running the command

echo %path%

from a command prompt; you'll see that the variable contains one or more paths, such as c:program files;c:program filessupport tools. Using this PATH variable as an example, if the executable resides in either the Program Files or Support Tools folder, you don't need to type the complete path.

Sometimes you might want to check the location of an executable file (e.g., a command). To do so, start a command prompt (cmd.exe) and type

where 

For example, entering the command

where dcdiag.exe

displays the following results:

C:program filessupport toolsdcdiag.exe

About the Author

Sign up for the ITPro Today newsletter
Stay on top of the IT universe with commentary, news analysis, how-to's, and tips delivered to your inbox daily.

You May Also Like