How to Run an EXE File in CMD on Windows: 2 Proven Ways

5 mins read

Updated on 2026-10-28 18:08:55 to Windows Fix

To run an EXE file in Command Prompt (CMD), enter its full path in quotation marks, such as `"C:\Path\To\App.exe"`, and press Enter. Alternatively, use the `cd` command to switch to the folder containing the file before running it. This article shows how to use each method and what to check if the command doesn't work.

how to run an exe file in cmd

How to Run an EXE File in CMD

You can run an EXE file in CMD by entering its full path or switching to its folder first. The same methods also work for running BAT files in CMD.

Method 1. Run an EXE File Using Its Full Path

If you know where the EXE file is stored, you can execute the EXE file in CMD directly without changing directories.

  • Find the EXE file in File Explorer. On Windows 11, right-click the file and select "Copy as path". On Windows 10, open the file's Properties to check its location and combine it with the file name.

    check the file path of exe file
  • Open the Start menu, type cmd, and select Command Prompt.

  • Paste the copied path into CMD and press Enter. For example:

    "C:\Users\admin\Desktop\4ddig-for-windows.exe"
    run an exe file using its full path in cmd

Keep the quotation marks around paths that contain spaces, such as those under C:\Program Files.

Method 2. Run an EXE File from Its Folder

You can also switch to the folder containing the EXE file before running it using CMD.

  • Open File Explorer and locate the folder containing the EXE file.

  • Copy the folder path from the address bar.

  • Open CMD and enter the following command, replacing the example path with your own:

    cd /d "C:\Program Files\MyApp"

    Press Enter to switch to that directory. The /d option also changes the current drive when necessary.

    open the folder in cmd
  • Enter the executable's file name and press Enter:

    MyApp.exe
    run an exe file from its folder in cmd
💡 Tip:

To launch the program in a separate window, use the start command: start "" "MyApp.exe"

The empty quotation marks tell start that no window title is specified, so it treats MyApp.exe as the program to launch. Make sure you are in the folder containing the executable before running this command.

How to Fix an EXE File That Won't Run in CMD

If an EXE file fails to launch, check the error message and confirm that the file exists before trying other fixes.

  • The system cannot find the file specified: Check the file path and name, including the .exe extension. Make sure the file has not been moved or deleted.
  • Access is denied: Your account may not have the required permissions. If the program needs administrator access, search for CMD, right-click it, and select Run as administrator.
  • The EXE file is blocked: Windows Security or SmartScreen may have blocked the file. Check the warning and make sure the file comes from a trusted source before allowing it to run.
  • The EXE file still won't launch: The file may be damaged or incompatible with your Windows version. Try opening it from File Explorer to see whether it also fails there.

How to Recover Deleted or Lost EXE Files

If an EXE file is missing, try downloading it again from the original website or source first. If you can't find another copy, 4DDiG Data Recovery can help recover the file from your drive.

It supports over 2,000 file types, including TMP, DAT, DB, and MD files. It can also help recover data lost through accidental deletion, drive formatting, partition loss, or system crashes.

FREE DOWNLOAD

Secure Download

FREE DOWNLOAD

Secure Download

  • Install and open 4DDiG. Select the drive or partition where the deleted .exe file was originally stored. 4DDiG will automatically start scanning for recoverable files.

    launch 4ddig and enter interface
  • Wait for the scan to find deleted and lost files. Use the file-type filters or search for the EXE filename to locate the missing program file or installer more quickly.

    click type to see all files 4ddig
  • Preview the recoverable file, if preview is supported, and check its filename and details. Select the EXE file you want to restore and click "Recover."

    recover the exe files
  • Choose a different drive or another safe location to save the recovered EXE file. Click "Save Now" to complete the recovery.

    save the recoverable exe files
Important:

To avoid overwriting lost data, save the recovered EXE file to a different drive or another safe location, such as cloud storage. Do not save it to the original location.

Conclusion

Running an EXE file from CMD is usually straightforward once you know the correct file path and have the necessary permissions. If the problem is a missing executable rather than a command error, 4DDiG can help you look for a recoverable copy before you reinstall the application.

William Bollson (senior editor)

William Bollson, the editor-in-chief of 4DDiG, devotes to providing the best solutions for Windows and Mac related issues, including data recovery, repair, error fixes.

(Click to rate this post)

You rated 4.5 ( participated)