Open In App

How to Run an exe through CMD?

Last Updated : 15 Apr, 2024
Improve
Improve
Like Article
Like
Save
Share
Report

In Microsoft Windows, we can use the command prompt or cmd to run an executable file (ending with .exe). Normally we double-click an exe file to execute that file by using cmd we can run an executable program or script without using our mouse. In this article, you will learn how to use the start command to run an exe file using the command prompt.

How to Run an exe through CMD?

  1. Open cmd using the Run window
  2. Copy the file path from the Address bar.
  3. Paste it after the cd command to move to the directory.
  4. To open the executable use the command: start file_name.exe.
    start chrome.exe

Note: You can also use only the file_name the extension “.exe” is optional.

Your exe file will open instantly. Let’s check out these steps with a proper demonstration.

Step 1: Open CMD Using the Run window

Open Command Prompt by searching in the start menu or entering cmd in the Run window which can be access by the shortcut “Winkey + R“.

step1-Run-window

Opening cmd using Run window

Step 2: Copy the File Path From the Address bar.

The location of the file can be copied from the Address bar found in top of the file explorer. After you reach that required file location click on the Address bar and then copying using the right-click context menu or the shortcut “Ctrl+C“.

step-2-Address-bar

Using Address bar to copy the location

Step 3: Type ‘cd’ Followed by File Path

Use cd command for navigating to the location where the exe file is present by pasting the location that you copied. After entering the prompt location must change but in case of any issues, cmd will display an error message.

Example: cd C:\Users\GFG0388\Desktop\My folder
step-3-cd-to-the-location

Using cd command for navigating to the location

Step 4: Run an exe File with ‘start’ Command

Now, use the start command to execute the required exe file by providing the file name. The command instantly run the executable so beware of sudden change or window pop-up.

Example: start chrome.exe
step-4-starting-the-exe

Using the start command to execute the .exe file.

Conclusion

Perhaps, to run files through CMD can be an alternative way to launch programs without using your mouse. This method is helpful for automation scripts or situations where using the mouse is inconvenient. Also, if you frequently work with the command prompt and do not want to change windows that is a faster method of running exe files in command prompt.

Also Read

Frequently Asked Questions to open file through CMD

Why I am getting error while using the cd command?

Double check the location if it exists and if you are typing manually then ensure that there is not typos. Also remember the location must not contain the file name along with it as cd command will return an error that the directory name is invalid.

Why the executable is not starting?

Sometimes executable run in the background and may not have a UI or window. If the start command in not returning an error that means it definitely ran. Always double check that the exe file you are running is not a malicious program as these can definitely cause harm to the computer.

Are there other ways to run exe files?

Yes, you can create a shortcut to the exe file or run it directly from the file location by double-clicking it. You can also run the file in PowerShell but not using the above mentioned steps, kindly refer proper documentation.


Like Article
Suggest improvement
Previous
Next
Share your thoughts in the comments

Similar Reads