How to Run a Program on Command Prompt
This wikiHow teaches you how to start a program on your Windows computer from within the Command Prompt app. You can only run programs that are installed in Windows-created folders (e.g., the Desktop), though you can add a program's folder...
Method 1 of 2:
Opening Basic Programs
- Open Start
- If you're using Windows 8, instead place your mouse cursor in the top-right side of the screen and then click the magnifying glass icon in the pop-out window.
- Type command prompt into Start. Doing so will search your computer for the Command Prompt program.
- Click Command Prompt
- If you're using a computer with restricted privileges, you may not be able to open Command Prompt.
- Type start into Command Prompt. Make sure you place a space after start.
- Type the program's name into Command Prompt. This must be the file's system name, not its shortcut name (for example, Command Prompt's system name is cmd). Common program names include the following:
- File Explorer - explorer
- Calculator - calc
- Notepad - notepad
- Character Map - charmap
- Paint - mspaint
- Command Prompt (new window) - cmd
- Windows Media Player - wmplayer
- Task Manager - taskmgr
- Press ↵ Enter. Once your command resembles start program_name, doing so will run the "start" command for your selected program. You should see the program open within a few seconds of entering the command.
- If your selected program won't run, it is most likely in a folder that isn't in the Command Prompt's search path. You can add the program's folder to the Command Prompt path to fix this problem.
Method 2 of 2:
Opening Specific Programs
- Open Start
- Open File Explorer
- Open the folder your program is in. Navigate to the folder that has the program you want to open by clicking on any folders needed to get to it.
- When the icon for the program you want to open in Command Prompt displays in the middle of the File Explorer window, you're in the correct folder.
- If you don't know the location of the program, many programs are often located in the "Program Files" folder on the hard drive, or you can search for it in the search bar at the top.
- Select the program's folder's path. Click the right side of the address bar that's at the top of the File Explorer window. You should see a blue box highlight the address bar's contents.
- Copy the path. Press Ctrl and C at the same time.
- Click This PC. This folder is on the left side of the File Explorer window.
- Click This PC again. Doing so will de-select any folders in the This PC folder, which will allow you to open the This PC folder's properties.
- Click Computer. It's a tab in the upper-left side of the page. A toolbar will appear.
- Click Properties. This icon resembles a white box with a red checkmark in it. Clicking it prompts a pop-up window to appear.
- Click Advanced system settings. It's a link in the upper-left side of the window. Doing so opens another pop-up window.
- Click the Advanced tab. It's at the top of the window.
- Click Environment Variables…. This option is at the bottom of the window. Another window will appear.
- Click Path. It's in the "System variables" window near the bottom of the page.
- Click Edit…. This option is at the bottom of the page.
- Click New. It's in the top-right side of the Edit page.
- Paste in your program's path. Press Ctrl and V at the same time to paste the path into the Path window.
- Click OK. This will save your path.
- Open Command Prompt.
- Open your path. Type cd into Command Prompt, type one space, press Ctrl+V to enter your program's path, and press ↵ Enter.
- Type start into Command Prompt. Make sure you leave a space after start.
- Enter your program's name. Type in the name of the program exactly as it appears in the folder, then press ↵ Enter. The program will run.
- If there are spaces in the program's name, place an underscore ("_") where a space should go (e.g., system_shock rather than system shock).
- Alternatively, you can enclose the path in double quotes. (eg: start "C:Program FilesWindows Media Playerwmplayer.exe")
5 ★ | 2 Vote
You should read it
- How to add 'Open command window here as administrator' to the right-click menu on Windows 10
- How to create a command line program in Python with Click
- How to open the CS 1.1 command window
- How to add Open command window here to Windows 10 right-click menu
- How to End a Program on a PC
- How to add 'Open PowerShell window here as administrator' to the right-click menu on Windows 10
- How to Customize the Font in Windows Command Prompt
- Color command in Windows
- How to Locate Viruses Using the Attrib Command
- How to Execute a Program in Command Prompt
- How to use the command history function in Command Prompt
- How to open Microsoft Excel from Command Prompt