Skip navigation

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

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 files\support 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 files\support tools\dcdiag.exe
Hide comments

Comments

  • Allowed HTML tags: <em> <strong> <blockquote> <br> <p>

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
Publish