Opening an exe file from the command prompt in Windows or on a Mac: 10 steps (with pictures)

Table of contents:

Opening an exe file from the command prompt in Windows or on a Mac: 10 steps (with pictures)
Opening an exe file from the command prompt in Windows or on a Mac: 10 steps (with pictures)
Anonim

This wikiHow teaches you how to use the command line in Windows and on the Mac to start an executable file (exe).

Steps

Run Exe from Cmd on PC or Mac Step 1

Step #1. Open the Start menu

Click the Start button in the lower left corner of your desktop to open the Start menu.

Run Exe from Cmd on PC or Mac Step 2

Step #2. Type and search cmd in the Start menu

At the top of the window, the term Command Prompt should appear as a search result.

Run Exe from Cmd on PC or Mac Step 3

Step 3. Click on Command Prompt from the Start menu

A new Command Prompt window will appear.

Run Exe from Cmd on PC or Mac Step 4

Step 4. Type cd [file path] in the Command Prompt

This command will take you to the folder containing the exe program you want to run.

Run Exe from Cmd on PC or Mac Step 5

Step 5. Find the file path of the folder containing the exe program

Open the folder containing the program in an explorer window, and copy the file path from the address bar at the top of the window.

  • For example, if you're trying to open Mozilla Firefox, the exe file you want to open is probably in a folder called Mozilla Firefox in "Program Files" or "Programs" in drive C.
  • In that case, the path is C:\Program Files\Mozilla Firefox.
Run Exe from Cmd on PC or Mac Step 6

Step 6. Replace [filepath] in the command with the actual path to your file

By going to that file location you can execute commands there such as starting the exe file in that folder.

For example, if you want to start Mozilla Firefox, your command might look like this: cd C:\Program Files\Mozilla Firefox

Run Exe from Cmd on PC or Mac Step 7

Step 7. Press ↵ Enter or ⏎ Return on your keyboard.

This will take you to the selected file path in the Command Prompt.

Run Exe from Cmd on PC or Mac Step 8

Step 8. Type start [filename.exe] in the Command Prompt

This command starts the program from the selected file path.

Run Exe from Cmd on PC or Mac Step 9

Step 9. Replace [filename.exe] with the actual name of the program

It must exactly match the name of the program in the folder.

  • For example: if you want to run Mozilla Firefox, the program is called by default firefox.exe.
  • In this case, your command will look like this: start firefox.exe.
Run Exe from Cmd on PC or Mac Step 10

Step 10. Press ↵ Enter or ⏎ Return on your keyboard.

This will run the command to start the selected program.

Tips

  • An alternative way to open the Command Prompt is to use the Run command box in Windows. You open the Run window using the key combination ⊞ Win+R on your keyboard, after which you type cmd, and click To carry out click to open the Command Prompt.

Popular by topic