Start a program from the command prompt

Author: Eugene Taylor
Date Of Creation: 16 August 2021
Update Date: 1 July 2024
Anonim
Tutorial: How to Run Programs From a Command Line Prompt
Video: Tutorial: How to Run Programs From a Command Line Prompt

Content

In Windows, you can use the command prompt to give instructions to a part of the operating system that is not available through the graphical interface. Running a program from the command prompt can be faster because you don't have to look for the program's icon to open it. This article will show you how to use Command Prompt in Windows XP, Windows Vista, Windows 7 and Windows 8.

To step

Part 1 of 3: Starting the Command Prompt

  1. Click the Start menu, then click Run.
    • In Windows 8, right-click the Start menu, then Run. You can also access this menu by pressing WIN + X keys.
  2. In the Run dialog box, type cmd.
  3. The command prompt window opens.
    • The command prompt is a program that allows you to control your computer with commands.

Part 2 of 3: Opening a program from the command prompt

  1. In the command prompt window, type start notepad. The Notepad will now open.
    • Notepad is a word processor available in every version of Windows.
    • The command Start instructs the computer to open a program.
    • For this to work you will need to know exactly the file name of the software you want to open.
  2. In the command prompt window, type start explorer. This will open Windows File Explorer.
  3. Go to the Program Files folder, then open the Internet Explorer folder.
    • You can also open a folder of other software.
  4. Locate the file iexplore.exe. This is the Internet Explorer file name.
  5. In the command window, type start explore.
  6. Look up other programs you use often and write down the file names. Try to open the files with the start command.
    • These steps only work when programs are in the Program Files folder of Windows. If you want a program to start up outside of this folder as well, read on for instructions on how to do that.

Part 3 of 3: Make program files visible to the command prompt

  1. In the command window, type path. A series of file paths is printed on the screen, each separated by a semicolon. This is the PATH. When you use the start command, the command prompt looks through all of these directories, looking for the filename you typed.
  2. If possible, move a program's folder to the Program Files folder. This will allow the command prompt to find the executable program file.
    • If you'd rather not move the program files, you can update PATH and add new file paths.
  3. Open the program's properties. Find the program with an extension .exe that you want to open with the command prompt. Right-click on the program file, then click Properties.
  4. In the Properties window, next to Location, write down the full path.
    • Copy and paste does not work in the command window.
  5. Use the setx command. The setx command causes a path to be added to PATH. Type setx path "% path%;, type the file path you wrote down a moment ago and then type to finish . Hit Return.
  6. Type path. The file path has been added to PATH.
  7. Type Start and then the filename as it can be found in the directory you added to PATH.