Как запустить exe файл через консоль windows

Last Updated :
08 Mar, 2025

Running any software on Windows is quite easy, but what if you have to run any.exe file using the CMD? The Command Prompt in Windows is a powerful, versatile tool that grants users direct access to the operating system’s core functionalities. While graphical interfaces (GUIs) simplify many tasks.

In this guide, we will walk you through the fundamentals of navigating CMD, as well as learn how to run or .exe files through CMD. You’ll also learn how to handle common challenges, such as specifying file paths with spaces, running programs as an administrator, and integrating EXE commands into scripts for batch processing.

How-to-Run-an-exe-through-CMD

How to Run an EXE file through CMD

What is .exe in Windows

In Windows, a file with the .exe extension denotes an executable file, which contains a program that the operating system can run directly. When you double-click an .exe file, Windows loads this program into memory and executes its instructions. This format is commonly used for software applications, installers, and system utilities.

How to Run .exe file 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

  • Press Win + R to open the Run Dialog Box or Go to Start Menu and type «Run».
  • Now type «CMD» or «Command Prompt» and hit Enter.
Open CMD Using the Run window

Step 2: Copy the File Path From the Address bar

  • Go to File Location from the file explorer and click on the Address bar.
  • Now, make a right-click or hit Ctrl + C to copy the location on the Address bar.
Copy the File Path From the Address bar

Step 3: Type ‘cd’ Followed by File Path

  • Go to Command Prompt and use ‘cd’ command to navigate through the EXE file location and paste it along with the cd command (that you’ve copied)
  • After entering the prompt location, now replace the file path or location with it’s actual path to the folder which contains EXE file (that you want to run)
  • Hit ENTER and the path will be redirected to your desired location.
Example: cd C:\Users\GFG0388\Desktop\My folder
step-3-cd-to-the-location

Type ‘cd’ Followed by File Path

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.
  • Replace the filename.exe with your EXE file (ensure that it should match your program’s file & name)
  • The command instantly run the executable so beware of sudden change or window pop-up.
  • Hit the ENTER key and your selected EXE file will start executing.
Example: start chrome.exe
step-4-starting-the-exe

Run an EXE File

Issues and Troubleshooting

Running executable (.exe) files through the Command Prompt (CMD) in Windows can sometimes present challenges. Here are common issues you might encounter and their potential solutions:

Executable Not Found: If you receive an error indicating that the executable isn’t recognized, it might be due to the system not knowing where to find the file.

Solution: Navigate to the directory containing the executable using the cd command before running it. Alternatively, add the executable’s directory to the system’s PATH environment variable to allow it to be run from any location.

Corrupted File Association: Sometimes, .exe files might not open correctly due to corrupted registry settings or interference from third-party applications or malware.

Solution: Modify the registry to restore the default configuration for running .exe files. Detailed instructions can be found in Microsoft’s support article.

Insufficient Permissions: Certain executables require administrative privileges to run.

Solution: Run the Command Prompt as an administrator by right-clicking on the CMD shortcut and selecting «Run as administrator.» Then, execute the .exe file.

Executable Opens and Closes Immediately: Some console applications might execute and close too quickly to read any output.

Solution: Run the executable directly within the Command Prompt to keep the window open and view the output. Alternatively, create a batch file that runs the executable followed by the pause command to prevent the window from closing immediately.

Command Prompt Not Working: If CMD itself isn’t functioning correctly, it can hinder running executables.

Solution: Troubleshoot the Command Prompt by restarting your computer, checking for system file corruption using tools like SFC (System File Checker), or modifying environment variables. A comprehensive guide is available to address this issue.

System Conflicts or Malware: Malware or system conflicts can prevent executables from running properly.

Solution: Perform a thorough malware scan using reputable antivirus software. Additionally, consider restoring your system to a previous state using System Restore if the problem started recently.

Conclusion

Being able to run an exe through CMD gives you greater control over your applications and can simplify certain tasks that might be cumbersome through a graphical interface. By following the steps outlined in this guide, you’ll be able to confidently execute exe files using Command Prompt in various scenarios, whether you’re running a setup program, launching a game, or automating a task.

Also Read

  • How to Execute C# Program on cmd (command-line)?
  • How to Abort a Command Execution in Command Prompt?
  • How to Find the Wi-Fi Password Using CMD in Windows 11/10?

Загрузить PDF

Загрузить PDF

В этой статье мы расскажем вам, как на компьютере с Windows запустить исполняемый файл (EXE-файл) из командной строки.

  1. Step 1 Откройте меню «Пуск».

    Оно находится в нижнем левом углу экрана.

  2. Step 2 Введите cmd в строке поиска меню «Пуск».

    Командная строка отобразится вверху результатов поиска.

  3. Step 3 Нажмите Командная строка в меню «Пуск».

    Откроется окно командной строки.

  4. Step 4 Введите cd [путь к файлу] в командной строке.

    Так можно перейти в папку с нужным EXE-файлом.

  5. Step 5 Найдите путь к EXE-файлу.

    Откройте папку с этим файлом, а затем скопируйте или запишите путь к файлу, который отображается в адресной строки вверху окна.

    • Например, если нужно запустить Mozilla Firefox, соответствующий EXE-файл может находиться в папке C:\Program Files\Mozilla Firefox.
    • В этом случае путь к файлу будет таким C:\Program Files\Mozilla Firefox.
  6. Step 6 Вместо [путь к файлу] подставьте путь к нужному файлу.

    Когда вы перейдете по этому пути, вы сможете запустить соответствующий EXE-файл.

    • Например, если нужно запустить Mozilla Firefox, команда будет такой cd C:\Program Files\Mozilla Firefox.
  7. Step 7 Нажмите клавишу ↵ Enter или ⏎ Return.

    В командной строке вы перейдете в папку с нужным файлом.

  8. Step 8 Введите start [имя_файла.exe] в командной строке.

    Эта команда запустит указанный файл.

  9. Step 9 Вместо [имя_файла.exe] подставьте имя нужного EXE-файла.

    Вводите имя так, как оно представлено в папке с файлом.

    • Например, в случае Mozilla Firefox нужным файлом является «firefox.exe».
    • В нашем примере команда будет выглядеть так: start firefox.exe.
  10. Step 10 Нажмите клавишу ↵ Enter или ⏎ Return.

    EXE-файл будет запущен.

    Реклама

Советы

  • Также, чтобы открыть окно командной строки, нажмите клавиши Win+R, в открывшемся окне «Выполнить» введите cmd и нажмите «ОК».

Реклама

Об этой статье

Эту страницу просматривали 136 522 раза.

Была ли эта статья полезной?

  • Home
  • News
  • How to Run Program from CMD (Command Prompt) Windows 10

By Alisa |
Last Updated

You can run a program or an exe file from Command Prompt. Check how to do it in this tutorial. MiniTool software, not only provides many useful computer solutions, but also provides users many useful computer software like data recovery program, disk partition manager, system backup and restore software, video editor, etc.

If you want to run program from CMD (Command Prompt) on Windows 10, you can check the detailed steps below.

How to Run a Program from CMD in Windows 10

You can only run the applications that are installed in Windows-created folders like Explorer in Command Prompt.

Step 1. Open Command Prompt in Windows 10

At first, you should open Command Prompt application on your Windows 10 computer. You can press Windows + R, type cmd, and press Enter to open normal Command Prompt or press Ctrl + Shift + Enter to open elevated Command Prompt on Windows 10.

Step 2. Run Program from CMD on Windows 10

Next you can type start <program name> command in Command Prompt window, and press Enter to open the target application in CMD. Replace the “program name” with the exact file’s system name of the program but not its shortcut name. For instance: start explorer.

how to run a program in Command Prompt

The file’s system name of some common programs in Windows are as follows:

  • Command Prompt: cmd
  • File Explorer: explorer
  • Task Manager: taskmgr
  • Calculator: calc
  • Notepad: notepad
  • Paint: mspaint
  • Windows Media Player: wmplayer

How to Run EXE in CMD on Windows 10

You can follow the instructions below to run an exe file in Command Prompt.

Step 1. Access Command Prompt window

You can follow the same operation above to open Command Prompt in Windows 10.

Step 2. Navigate to the folder of the target program

Next you can type cd <file path> command in Command Prompt window, and press Enter to navigate to the folder that contains the target exe application. Replace “file path” with the exact file path of the exe file.

You can find the target program folder and click the address bar at the top of File Explorer window to copy the path of the program folder and paste it after cd command. For example, cd C:\Program Files\Windows Media Player.

Step 3. Run exe from CMD

After you are in the target program folder path, then you can type start <filename.exe> after the selected file path in CMD, and press Enter to run the exe file in Command Prompt. Replace “filename.exe” with the target program name, e.g. start wmplayer.exe.

how to run exe file in Command Prompt

Bottom Line

This post introduces how to run a program or exe file from CMD on Windows 10. Hope it helps.

If you need a free data recovery software to recover deleted/lost files from Windows 10 computer or other storage devices, you can try MiniTool Power Data Recovery.

MiniTool Power Data Recovery is a Windows data recovery program that allows you to recover data from PC, external hard drive HDD or SSD, USB drive, SD card, memory card, and more. It is very simple to use and 100% clean.

About The Author

Position: Columnist

Alisa is a professional English editor with 4-year experience. She loves writing and focuses on sharing detailed solutions and thoughts for computer problems, data recovery & backup, digital gadgets, tech news, etc. Through her articles, users can always easily get related problems solved and find what they want. In spare time, she likes basketball, badminton, tennis, cycling, running, and singing. She is very funny and energetic in life, and always brings friends lots of laughs.

To run an executable file (EXE) in the Command Prompt (cmd), simply navigate to the directory containing the EXE file and enter its name along with the `.exe` extension.

cd C:\Path\To\Your\Executable
yourfile.exe

Understanding CMD and EXE Files

What is CMD?

The Command Prompt, often referred to as CMD, is a command-line interpreter application available in most Windows operating systems. It allows users to execute commands for various tasks, including file management, system administration, and program execution. CMD is an invaluable tool for system administrators, allowing for the efficient handling of complex tasks and automation through scripts.

What is an EXE File?

An EXE file, short for «executable,» is a type of file that contains a program that your computer can run. These files often perform specified tasks or launch applications when executed. EXE files are pervasive in the Windows environment, as they serve as the primary format for executable software, ranging from simple applications to complex programs.

How to Run Commands in Cmd: A Quick Guide

How to Run Commands in Cmd: A Quick Guide

Preparing to Run an EXE in CMD

Navigating to the Right Directory

Before executing an EXE file, it is essential to navigate to the directory containing the file using CMD. This can be accomplished using the `cd` (change directory) command.

For instance, to navigate to a folder called «YourProgram» in «Program Files,» you would enter:

cd C:\Program Files\YourProgram\

This command changes your current directory to «YourProgram,» making it easier to run the desired EXE.

Knowing the Full Path of the EXE

In many cases, you may need to know the full path of the EXE file you want to run. To find this, you can right-click on the EXE file in Windows Explorer, select Properties, and check the «Location» entry. This gives you the path needed to run the file seamlessly.

How to Run Py File in Cmd: A Quick Guide

How to Run Py File in Cmd: A Quick Guide

How to Run an EXE File from CMD

Opening CMD

To execute a program using CMD, you first need to open Command Prompt. There are several ways to do this:

  • Press `Win + R`, type cmd, and hit Enter.
  • Search for «cmd» in the Windows start menu and select it.
  • Right-click on the Start button and choose Command Prompt (Admin) for elevated privileges.

Running an EXE File

After opening CMD, running an EXE file is as simple as typing a command. The basic command structure to run an EXE file is:

start [path to exe]

For example, if you wanted to run an EXE file located in “YourProgram,” you would enter:

start C:\Program Files\YourProgram\yourprogram.exe

Opening an EXE in the Current Directory

If you’ve already navigated to the correct directory, running the EXE is even simpler. Just type the name of the EXE:

yourprogram.exe

This will launch the application directly from the current directory.

Using the Full Path to the EXE

In situations where you’re not in the directory of the EXE or prefer to use the full path for clarity, executing it directly using the following format is the best approach:

C:\Program Files (x86)\Microsoft Office\root\Office16\WINWORD.EXE

This command will run Microsoft Word, ensuring you’re specifying the exact location of the file.

How to Run Python in Cmd: A Quick Guide

How to Run Python in Cmd: A Quick Guide

Additional Techniques for Running EXEs in CMD

Running EXE Files with Administrative Privileges

Certain programs require administrative privileges to run correctly. Knowing how to execute these programs under such permissions is essential. To run CMD as an administrator:

  1. Search for cmd in the Start menu.
  2. Right-click and select Run as administrator.

This grants you access to run EXE files that would otherwise be restricted.

Executing EXE Files with Command-Line Arguments

Many EXE files accept command-line arguments that modify how they operate. These arguments can be options, configurations, or directories to open, providing flexibility and customization.

For example, if a program supports a feature to open a specific file, you might use:

yourprogram.exe --option value

This method can greatly enhance the usability of certain programs within CMD.

Troubleshooting Common Issues

While executing EXE files in CMD is straightforward, you may encounter some common issues:

  • File Not Found: If CMD returns an error stating that it cannot find the file, double-check to ensure that the path is correct and that the file exists.
  • Access Denied: This error usually indicates that the program requires administrative rights. You might need to rerun CMD as an administrator.

How to Run a Cmd Command: A Quick Guide

How to Run a Cmd Command: A Quick Guide

Advanced Commands for Executing EXE Files

Using `CALL` Command

The CALL command can be useful when you want to run a subroutine or another CMD script and return to the original script afterward. This is particularly beneficial when dealing with batch files.

Example:

CALL C:\Path\to\yourprogram.exe

This allows you to execute the EXE and then return to the calling context without closing the initial CMD instance.

Using `START «»` Command

The START command can also be executed with an empty title, which is beneficial when the path to the executable includes spaces. This method prevents CMD from misreading the path. For example:

START "" "C:\Path\to\yourprogram.exe"

This command launches the specified program while handling spaces correctly, ensuring smooth execution.

How to Run XML File in Cmd: A Quick Guide

How to Run XML File in Cmd: A Quick Guide

Conclusion

Understanding how to run an EXE file in CMD opens up a myriad of possibilities for users looking to automate tasks and enhance their productivity. By employing the various techniques and commands outlined in this guide, you can confidently execute any EXE file through the Command Prompt.

With practice, CMD can simplify numerous tasks, so don’t hesitate to explore more commands and functionalities to maximize your experience in Windows!

Quick Links

Most of the time our programs work just like we need them to, but every once in a while you have one that is less than cooperative and leaves you looking for a way to fix its ‘attitude’ problem. Today’s SuperUser Q&A post has some great suggestions to help a frustrated reader get the results he needs.

Today’s Question & Answer session comes to us courtesy of SuperUser—a subdivision of Stack Exchange, a community-driven grouping of Q&A web sites.

The Question

SuperUser reader user418119 wants to find a way to keep a program window open long enough to see the results:

I am trying to run an iteration program. Whenever I click on it, it opens then terminates. When I open the input text file using the program, the iteration completes, then the window instantly closes. How can I:

1. Run it so that the window does not close (and I can see my results)

Or

2. Manage to do the same thing via Command Prompt

I am not super familiar with doing stuff via Command Prompt.

Is there a way to make user418119’s program window stay open long enough to see the results?

The Answer

SuperUser contributors mg30rg, misha256, and Ranayna have the answer for us. First up, mg30rg:

You can create a batch file (.bat) containing two lines. The first one is your application’s command line and the second one is «PAUSE». It will keep the Command Prompt window open until you press a key or close it using the «X» button. The advantage of this solution is that you can have a separate shortcut to the .bat file so that you can either start your program with or without pausing at the finish.

Followed by the answer from misha256:

This will leave the Command Prompt window open even after MyApp.exe terminates:

  • cmd /K «C:\SomeFolder\MyApp.exe»

You can create a shortcut with the above. This solution works with all console programs and does not require you to go through Command Prompt every time or modify the original .exe file (which you usually cannot).

Incidentally, the /K switch has been around since NT days.

And our final answer from Ranayna:

Another way which is quite useful if the path to the .exe file is a complicated one: Open a Command Prompt window and just drag the .exe file into the window. The full path to the .exe file will be pasted into the Command Prompt window and you just have to press Enter. There is no need to cd into any paths.


Have something to add to the explanation? Sound off in the comments. Want to read more answers from other tech-savvy Stack Exchange users? Check out the full discussion thread here.

Понравилась статья? Поделить с друзьями:
0 0 голоса
Рейтинг статьи
Подписаться
Уведомить о
guest

0 комментариев
Старые
Новые Популярные
Межтекстовые Отзывы
Посмотреть все комментарии
  • Не работает служба windows search
  • Срок действия windows 10 скоро истекает что делать как убрать
  • C users all users microsoft windows containers baseimages
  • Windows create file cmd windows
  • Установка windows server 2012 r2 пошагово