How to Execute a Program in Command Prompt

Author: Lewis Jackson
Date Of Creation: 13 May 2021
Update Date: 12 May 2024
Anonim
How to Compile and Run Java Program from Command Prompt
Video: How to Compile and Run Java Program from Command Prompt

Content

This article shows you how to open a program on a Windows computer using the Command Prompt application. Although you can only open programs installed in a folder created by Windows (such as the Desktop), you still have the right to add a program's folder to the Command Prompt list to open the program with the Command Prompt.

Steps

Method 1 of 2: Open basic programs

  1. Click the Windows logo in the lower left corner of the screen or press the Windows logo key on your computer keyboard.
    • If using Windows 8, you will place your mouse pointer in the upper-right corner of the screen and then click the magnifying glass icon in the menu that appears.

  2. with a black box icon at the top of the Start window to open the program.
    • If you use a computer with limited access, you cannot open the Command Prompt.
  3. Click the Windows logo in the lower left corner of the screen or press the Windows key on your computer's keyboard.
  4. Click the folder icon in the lower left corner of the Start window.

  5. Open your program's save folder. Access the folder containing the program you want to open by clicking on any folder to open.
    • When the program icon you want to open with Command Prompt appears in the middle of the File Explorer window, you have the correct folder open.
    • If you don't know where the program is stored, you can access the "Program Files" folder on your hard drive because a lot of programs are stored here, or you can use the search bar at the top of the window.

  6. Select the path to the program's directory. Right-click the address bar at the top of the File Explorer window. You will see the contents of the address bar highlighted in green.
  7. Copy the link by pressing Ctrl and C same time.
  8. Click on folder This PC on the left side of the File Explorer window.
  9. Click on folder This PC once again. This will deselect any folders in the folder This PC, allows you to open the folder properties This PC.
  10. Click the card Computer in the top left corner of the page to see the toolbar.
  11. Click Properties. It's a white box icon with a red check mark. Once clicked, you will see another pop-up window.
  12. Click on the link Advanced system settings (Advanced system settings) in the upper-left corner of the window. This will open another window.
  13. Click the card Advanced (Advanced) at the top of the window.
  14. Click on options Environment Variables ... (Environment Variables) is at the bottom of the window. The screen will display another window.
  15. Click Path (Path) in the "System variables" window near the bottom of the page.

  16. Click on options Edit ... (Edit) at the bottom of the page.
  17. Click new (New) in the upper-right corner of the Edit page.


  18. Paste the program's path. Press the key Ctrl and V at the same time to paste the path into the Path window.


  19. Click OK to save the path.
  20. Open Command Prompt.

  21. Open the path. Type CD Enter Command Prompt, press the spacebar, and then press Ctrl+V to paste the program path and press ↵ Enter.
  22. Type start into the Command Prompt. Remember to put a space after start.
  23. Enter the name of the program. Type the exact name of the program shown in the folder, and then press ↵ Enter and the program will be started.
    • If there is a space in the program's name, type an underscore ("_") in place of a space (such as system_shock instead of system shock).
    • Or, you can put the path in quotes. (For example: start "C: Program Files Windows Media Player wmplayer.exe")
    advertisement

Advice

  • One way to make sure you can open any program with Command Prompt is to install your entire program in the Documents folder.

Warning

  • Without administrator access on the computer, you won't be able to open the Command Prompt or change the default path.