Easily execute a program from CMD
Do you need to open a program on Windows without clicking its icon or menu item? Running programs from the Windows Command Prompt, or CMD, is easy, thanks to the "start" command. This wikiHow article will teach you how to launch executable (exe) files in Windows from the command line using Command Prompt.
Quick Steps
- Locate the filepath of the folder that holds the EXE you want to run.
- Open Command Prompt.
- Type the command "cd [filepath]", replacing [filepath] with the path to the folder.
- Enter the command "start [name.exe]", replacing [name.exe] with the name of the EXE file.
Steps
Section 1 of 2:
Running an EXE in CMD
-
Find the file path of the folder containing your exe program. Open the folder containing your program in a File Explorer window, and copy or note the file path from the address bar at the top of the window.
- To copy the path, click the address bar at the top, then press Ctrl + C .
-
Type and search cmd in the taskbar search bar. Command Prompt should show up at the top of the search results.Advertisement
-
Click Command Prompt on the Start menu. This will open a new Command Prompt window. [1] X Research source
- For example, if you're trying to run Mozilla Firefox , the exe file you want to run may be located in a folder called Mozilla Firefox in Program Files on your C drive.
- In this case, your file path is C:\Program Files\Mozilla Firefox .
-
Type cd [filepath] in the command with your program's file path. Replace [filepath] with the actual path to the folder that contains the EXE program you want to run. [2] X Research source
- For example, if you're trying to run Mozilla Firefox, your command here may look like cd C:\Program Files\Mozilla Firefox .
- If you copied the path earlier, press Ctrl + V to paste it.
-
Hit ↵ Enter or ⏎ Return on your keyboard. This will navigate you into the selected file path in Command Prompt.
-
Type start [filename.exe] and press ↵ Enter . Replace [filename.exe] with your program's name. This should exactly match your exe program's file name in the folder. Once you press Enter , the program will run.
- For example, if you're running Mozilla Firefox, the program file should be named firefox.exe by default.
- In this case, your command will look like start firefox.exe .
Advertisement
Expert Q&A
Search
-
QuestionHow can I make a exe file safe?Luigi Oppido is the Owner and Operator of Pleasure Point Computers in Santa Cruz, California. Luigi has over 25 years of experience in general computer repair, data recovery, virus removal, and upgrades. He is also the host of the Computer Man Show! broadcasted on KSQD covering central California for over two years.Be sure to scan the exe file with your antivirus program first—sometimes, the program can open up that package and see malicious things that are inside. Still, you should only ever open an exe file when you know exactly what it is, as these files can be very dangerous.
-
QuestionHow can I run the exe as an executable if I know the file extension is not exe? For example, if the file is compiled on Linux and transferred to Windows, how would I run the file without an extension?Community AnswerEdit the file's name (press F2 or right click and rename), then add an .exe to run the file as executable in Windows.
-
QuestionAfter following the process, I am getting error "Failed to execute script". Could you please help me in this?The coding catCommunity AnswerThis may be because the script you are trying to run is broken or it cannot be found.
Ask a Question
200 characters left
Include your email address to get a message when this question is answered.
Submit
Advertisement
Video
Tips
- An alternative way to open Command Prompt is to use Windows' Run feature. You can open the Run window by pressing ⊞ Win + R on your keyboard, typing cmd here, and clicking the Run button to open Command Prompt.Thanks
Tips from our Readers
The advice in this section is based on the lived experiences of wikiHow readers like you. If you have a helpful tip you’d like to share on wikiHow, please submit it in the field below.
- If you want to make this .exe file run from the command prompt no matter which directory you're in, go to "Edit system environment variables," select "Path" under "system variables, click "Edit," and add the directory.
- When a file or folder name has spaces, put the name in quotation marks.
Submit a Tip
All tip submissions are carefully reviewed before being published
Name
Please provide your name and last initial
Thanks for submitting a tip for review!
Advertisement
References
About This Article
Thanks to all authors for creating a page that has been read 1,442,376 times.
Advertisement