How to run an EXE file from the command line

Author: Gregory Harris
Date Of Creation: 10 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 this article, we will show you how to run an executable (EXE) file from the command line on a Windows computer.

Steps

  1. 1 Open the start menu. It's in the lower left corner of the screen.
  2. 2 Enter cmd in the start menu search bar. The command line appears at the top of the search results.
  3. 3 Click on Command line in the start menu. A command prompt window will open.
  4. 4 Enter cd [path to file] at the command line. This will navigate to the folder with the desired EXE file.
  5. 5 Find the path to the EXE file. Open the folder with this file, and then copy or write down the path to the file that appears in the address bar at the top of the window.
    • For example, if you want to run Mozilla Firefox, the corresponding EXE file can be located in the C: Program Files Mozilla Firefox folder.
    • In this case, the file path will be like this C: Program Files Mozilla Firefox.
  6. 6 Instead of [the path to the file] substitute the path to the desired file. When you follow this path, you should be able to run the corresponding EXE file.
    • For example, if you need to start Mozilla Firefox, the command will be like this cd C: Program Files Mozilla Firefox.
  7. 7 Press the key ↵ Enter or ⏎ Return. On the command line, you will navigate to the folder with the desired file.
  8. 8 Enter start [filename.exe] at the command line. This command will run the specified file.
  9. 9 Instead of [filename.exe] substitute the name of the desired EXE file. Enter the name as it appears in the file folder.
    • For example, in the case of Mozilla Firefox, the required file is "firefox.exe".
    • In our example, the command will look like this: start firefox.exe.
  10. 10 Press the key ↵ Enter or ⏎ Return. The EXE file will run.

Tips

  • Also, to open a command prompt window, press the keys ⊞ Win+R, in the Run window that opens, enter cmd and click OK.