Categories
Interior

How to run command prompt commands from a windows shortcut

By Tina | Follow | Last Updated October 22, 2021

Summary :

How to run command prompt commands from a windows shortcut

The Run Command offers great convenience for users to access some specific programs. But do you know how to open Run Command Windows 10? This post from MiniTool will show you 6 ways to open the Run box.

The Run Command on an operating system such as the Microsoft Windows and Unix-like system is used to directly open an application or documents whose path is known. In this way, it provides great convenience to access the specified program and enables you to access the program quicker.

Hence, do you know how to open Run Windows 10? If you do not know, continue your reading and the following part will show you how to open Run box in Windows 10.

How to run command prompt commands from a windows shortcut

Here are 10 ways to open Control Panel Windows 10/8/7. Learn how to open Control Panel Windows 10 with shortcut, command, Run, Search Box, Start, Cortana, etc.

6 Ways – How to Open Run Command Windows 10

In this section, we will show you how to open Run Windows 10. As a matter of fact, there are 6 ways and they will be introduced one by one.

How to Open Run – Keyboards Shortcut

At first, to open Run Command, you can use the keyboards shortcut. To open Run Command, you can press Windows key and R key together to show it.

How to Open Run – Quick Access Menu

To open Run box, you can also use the quick access menu.

Now, here is the tutorial.

  1. Right-click the Windows icon on the left corner to display the menu.
  2. Then choose Run to continue.

How to run command prompt commands from a windows shortcut

This is the second way to open Run command and you can try it.

How to Open Run – Search Box

To open Run command, you can also do that through the Windows Search box in Task Manager.

Now, here is the tutorial.

  1. Type Run in the search box and choose the best-matched one.
  2. Then double-click it to launch it.

After that, you have successfully opened the Run box, and you can type some commands or type the path to access some specific program or folder.

How to Open Run – Start Menu

Apart from the above ways to access Run Command, you can also open Run box via the Start Menu.

Now, here is the tutorial.

  1. Click the Windows icon on the left corner to display the menu.
  2. Then scroll down to find the Windows System.
  3. Expand it and choose Run.
  4. Then click it to open it.

How to run command prompt commands from a windows shortcut

When all steps are finished, you have successfully opened the Run box.

How to Open Run – This PC

In this part, we will show you the fifth way to open Run Command. You can open it via the This PC.

Now, here is the tutorial.

  1. Go to This PC.
  2. Then type Run in the top-right box, then it will take some time to find the Run box.
  3. After that, scroll-down to find it and double-click it to launch it.

How to run command prompt commands from a windows shortcut

How to Open Run – Command Prompt

This part will show you the last way to open Run Command. You can choose to open via the Command Prompt.

Now, here is the tutorial.

  1. Open Command Prompt Windows 10.
  2. Then type explorer.exe Shell. in the box and hit Enter to continue.
  3. Then the Run box will be opened.

How to run command prompt commands from a windows shortcut

When it is finished, you have opened the Run box.

Final Words

To sum up, this post has shown 6 ways to open Run box. If you want to open Run Command, you can try these ways. If you have any better to open Run Command in Windows 10, you can share it in the comment zone.

  • Facebook
  • Twitter
  • Linkedin
  • Reddit

ABOUT THE AUTHOR

How to run command prompt commands from a windows shortcut

Position: Columnist

Tina is a technology enthusiast and joined MiniTool in 2018. As an editor of MiniTool, she is keeping on sharing computer tips and providing reliable solutions, especially specializing in Windows and files backup and restore. Besides, she is expanding her knowledge and skills in data recovery, disk space optimizations, etc.

On her spare time, Tina likes to watch movies, go shopping or chat with friends and enjoy her life.

By Tom’s Hardware Community published 20 March 18

This tutorial was written by Tom’s Hardware Community member viveknayyar007. You can find a list of all their tutorials here.

If you’re troubleshooting your computer, you may need to boot Windows 10 in the Command Prompt.

If Windows 10 can’t boot at all, the command line interface (CLI) is the only option you have. Booting Windows 10 in Command Prompt requires that you have Windows 10 on a bootable disc or USB drive.

Here’s how you can start your Windows 10 PC in Command Prompt:

  • Power on your computer.
  • While powering on, press the appropriate keys on your keyboard to enter the BIOS. Note: Different computers have different keys to enter the BIOS depending on their vendor. Most of the times, the correct key or key combination is displayed on the screen along with the vendor logo as soon as you power on the PC.
  • When the BIOS interface appears on the screen, go to the Boot tab.
  • Depending on the type of media you prefer to use to start the computer with, make the DVD or USB drive the first bootable device. Note: The process to change the boot device priority may vary from computer to computer. The information about the correct keys to get this done is present somewhere on the boot device configuration screen itself.
  • Insert or connect the Windows 10 bootable media (disc or USB drive) to the computer.
  • Press F10 and then press Enter to save configuration and to restart the PC.
  • During the restart, when prompted, press any key on the keyboard to boot the computer with the bootable media.
  • On the first window, select your preferred language, time and currency format, and keyboard layout and click Next.
  • On the next window, click Repair your computer from the lower-left corner.
  • From the Choose an option window, click Troubleshoot.
  • Click Advanced options from the Troubleshoot window.
  • When the Advanced options window opens, click Command Prompt.
  • On the command window, type D: and press Enter to go to the C: drive of your computer. Note: Because your computer is started with bootable media, the System Reserved partition of your hard drive is temporarily marked as C: and therefore the C: drive that you see from within Windows 10 is marked as D: drive. This is a temporary modification. Things will go back to normal as soon as you start Windows 10 normally. Note: Many commands can be executed when you are in the X:Sources directory, which is a temporary container that is created when you start Windows 10 externally. However, to execute main commands, it is important to switch to the system drive which in most cases is D: when the PC is booted externally, and C: when booted normally.
  • Once on the system drive, you can start typing and executing the commands as needed.
  • After you are done troubleshooting, you can either type EXIT in the command window itself and press Enter, or click the Close button from the top-right corner to exit Command Prompt. Back on the Choose an option window, click Continue to boot to Windows 10 normally. Alternatively, you can also click the Turn off your PC option if you wish to power off the computer and restart it any time later.

The Tom’s Hardware forum community is a powerful source of tech support and discussion on all the topics we cover from 3D printers, single-board computers, SSDs, and GPUs to high-end gaming rigs. Articles written by the Tom’s Hardware Community are either written by the forum staff or one of our moderators.

Walter Glenn is a former Editorial Director for How-To Geek and its sister sites. He has more than 30 years of experience in the computer industry and over 20 years as a technical writer and editor. He’s written hundreds of articles for How-To Geek and edited thousands. He’s authored or co-authored over 30 computer-related books in more than a dozen languages for publishers like Microsoft Press, O’Reilly, and Osborne/McGraw-Hill. He’s also written hundreds of white papers, articles, user manuals, and courseware over the years. Read more.

How to run command prompt commands from a windows shortcut

Shortcuts are great for giving you quick access to files, apps, and folders. But did you know you can also use them to run Command Prompt commands?

Windows gives you all kinds of ways to run command prompt commands. Sure, you could open a Command Prompt window and just type the command. You could also create yourself a batch script (or a bash script or PowerShell script if that’s your thing). And frankly, if you’re planning on running more than one command or you need anything complex, writing a script is a better option. But for simple commands, why not just create a double-clickable shortcut instead? Here’s how to do it.

Create a shortcut by right-clicking anywhere in File Explorer or your desktop and choosing New > Shortcut.

How to run command prompt commands from a windows shortcut

In the Create Shortcut window, type your command using the following syntax:

The first part (the part in quotes) just calls cmd.exe to open the Command Prompt. The switch /k tells Command Prompt to issue the command that follows, and then stay open so that you can view results or type followup commands. You can also use the /c switch instead /k (use only one of the switches) if you want the Command Prompt window to close after issuing the command. And of course, the yourcommand part is the actual command you want to run.

For example, if you were creating a simple command to run the system file checker to find and fix problems with your system files, you’d type the following:

When you’ve created the command you want to use, click “Next.”

How to run command prompt commands from a windows shortcut

Type a name for the shortcut and then click “Finish.”

How to run command prompt commands from a windows shortcut

Now, you can run shortcut instead of firing up Command Prompt and typing the command manually each time.

Another clever thing you can do is pipe the results of a command to a text file (or other program). For example, say we wanted to run the command ipconfig /all , have the results saved to a file named ipconfig.txt on your desktop, and have the Command Prompt window close after running the command. We could use the following to make that happen:

How to run command prompt commands from a windows shortcut

If you use a single > for the piping command, Windows will overwrite the contents of the named file if the file already exists. If it doesn’t exist Windows will create the file. You can also use a double >> instead to have Windows append the new information from the command to an existing file instead of overwriting the file. This is useful if you want to keep a history of the results of a command.

Once you have your shortcut set up, it’s easy to run a command anytime you need to. And while you might still want to use a script for anything more complicated, running a command from a shortcut is great for simple one-off commands like scanning for corrupt system files, finding your IP address, shutting down Windows without installing updates, and more.

To start, let’s explore how to open the command prompt using a Windows 10 shortcut. It won’t do anything right away; you’ll still have to manually type in the command you want to do. However, what we’ll cover here will act as the basis for the other commands we’ll cover in this article.

First, we need to create a CMD shortcut. To do this, right-click in an empty space in File Explorer or the desktop. Then, go to New > Shortcut.

When you click this, Windows 10 will immediately show a pop-up window asking for a location. In this window, type “C:\Windows\System32\cmd.exe” then click Next.

This is telling Windows to go into the system files and run the Command Prompt executable. If your Windows 10 installation is on another drive, replace the “C:\” with the drive you use for your OS.

Once you click Next, you can name the shortcut something memorable. Give it a name like “Open Command Prompt” and click Finish.

Now when you double-click your new shortcut, the command prompt appears.

Now that we’ve got the basics down, let’s learn how to make a CMD shortcut with a command built into it. If you want to make a new shortcut, repeat the steps above; however, if you want to edit the command you created previously, simply right-click it, click Properties, then add your new command under Target.

Now, let’s run a command via our shortcut. To do this, type “C:\Windows\System32\cmd.exe” /k followed by your command.

For example, “C:\Windows\System32\cmd.exe” /k echo hello world will tell the command prompt to print “hello world.”

You may notice the odd “/k” in the middle of the command. This tells the command prompt to run what we type after it, then stay open so that you can see the result.

If you prefer the command prompt to close as soon as it’s done, replace this /k with /c instead.

How to run command prompt commands from a windows shortcut

You can also chain multiple commands together. Just add an ampersand (&) between each command to chain them.

Now you have everything you need to run commands from a shortcut, whether you want to manually type the command or automatically run a pre-set one. As such, let’s take some time to explore some useful ways you can use this tool to make specific tasks easier.

If a website you visit goes down often, or you want to check the health of a remote server, the ping and tracert commands come in great use. Ping lets you see how fast your connection between you and the target is, while tracert lets you see each step in the connection.

To set up an automatic ping command, enter “C:\Windows\System32\cmd.exe” /k ping followed by your target.

For example, “C:\Windows\System32\cmd.exe” /k ping www.google.com will let you know how fast you can contact Google in milliseconds.

If you keep having DNS connection issues, why not set up an automatic shortcut that flushes your DNS cache? Just create a shortcut with “C:\Windows\System32\cmd.exe” /k ipconfig /flushdns and double-click it every time a DNS connection problem appears. You may even want to use /c for this command to close it once it’s finished.

Finally, did you know that you can log off, restart, and turn off your PC from the command prompt? They all use the same “shutdown” command, but the variables you give the command defines which action you wish to perform.

All of the following commands are activated with “C:\Windows\System32\cmd.exe” /k shutdown, so enter that regardless of what you want to do. Then, add one of the following arguments to the end:

  1. /l will log off the current user.
  2. /r will restart the computer.
  3. /r /o will restart the computer then boot back into the advanced startup options.
  4. /s will turn off the computer.
  5. /s /hybrid shuts down the PC, then prepares it for a fast startup.
  6. /h will put the computer into hibernation mode.
  7. /a cancels a current shutdown sequence, as long as it’s done during the time out period.
  8. /t, when placed after a shutdown (/s) or restart (/r) command, defines how many seconds the PC will wait before performing that activity. Add a number after the /t to define the time; for example, /r /t 100 will restart the PC after 100 seconds pass.

If you need to run command prompt commands regularly in Windows, it may be useful to save the command somehow so that you can run it whenever the need arises without having to type it all out again.

While you can use batch files for that, it is also possible to use shortcuts instead. The core difference between the two options is that you can only run a single command using shortcuts while you can run a series of commands and get better customization options when using batch files.

Adding commands as desktop shortcuts in Windows is a straightforward easy process that requires zero knowledge of batch files and little knowledge about the commands you want to run.

Basically, you are using the command %comspec% /k for that followed by the command that you want to run. For instance, if you wanted to display the contents of drive c you would use the command %comspec% /k dir c: for that.

Comspec is a system variable that defines the command interpreter used on the system. If you have not modified that, cmd.exe is being used. The k parameter of cmd.exe keeps the execution window open after running the command. If you don’t require that, you may replace it with /c which terminates it.

Adding the shortcut

To add a new shortcut, right-click on a blank spot on your desktop and select New > Shortcut from the context menu.

How to run command prompt commands from a windows shortcut

Type the command that you want executed whenever you run the shortcut, for instance %comspec% /k dir c: or any other command in that format.

How to run command prompt commands from a windows shortcut

Click the next button and name the shortcut. The default name is set to cmd.exe which you may want to change, especially if you want to add multiple command prompt shortcuts on the system.

Once done run the shortcut to verify that it is working correctly. It is easiest with the /k parameter as you see the output in the command prompt window. Once you have verified the correctness, you may remove the /k parameter if you don’t need to see the output on the screen.

Closing Words

Using shortcuts to run commands on the command prompt can be quite useful, for instance if you need to run a command regularly. This can be something simple as the directory command listed above but also advanced commands that turn features on or off for example.

Now You: Have another tip? Feel free to share it with everyone else in the comment section below.

If you need quick access to a frequently used command, you can create desktop shortcut for Command Prompt commands. Here’s how.

If you are a regular Command Prompt user, there might be some commands that you use on a daily basis. For example, I have a simple command that copies data from one folder to the other on a schedule. From time to time, I also manually execute the command to copy the data. Since the command is just a single line, I’ve created a desktop shortcut for that Command Prompt command. Since then, all I have to do is double-click on the shortcut to execute the command. No need to manually open the Command Prompt and then manually type in the command.

So, if you are ever in this kind of situation, follow the below steps to create desktop shortcut for Command Prompt commands.

Steps to Create Desktop Shortcut for Command Prompt Commands

Since this is a simple desktop shortcut, we can create it with the shortcut creation wizard available from the desktop’s context menu.

1 . First, right-click on the desktop and select “New → Shortcut” option. This will open the shortcut wizard. How to run command prompt commands from a windows shortcut

2. In the blank field, enter the following command while replacing “YOUR_COMMAND_HERE” with the actual command you want to execute. Click on the “Next” button.

For example, I want to ping a website, so I replaced the dummy command like this.

How to run command prompt commands from a windows shortcut

3. Here, type the name of the shortuct. It can be anything you want. Click on the “Finish” button.

How to run command prompt commands from a windows shortcut

That is it. From now on, simply double-click on the shortcut and the command will be executed in the Command Prompt window. How to run command prompt commands from a windows shortcut How to run command prompt commands from a windows shortcut

(Optional/Advanced)Multiple Commands

If you want to, you can also run multiple commands using the same desktop shortcut. All you have to do is modify the above command a little bit.

To execute multiple commands with the desktop shortcut, use the below command. Don’t forget to replace the dummy commands with the actual commands.

As you can see, all we did is separate the commands with & operator. It tells the Command Prompt to execute both first and second commands one after the other. You can execute as many commands as you want with this trick. How to run command prompt commands from a windows shortcut

Do keep in mind that when you execute multiple commands, the Command Prompt will execute the commands one after the other and not simultaneously.

Note: The above method cannot execute commands that require admin rights. For that, create a shortcut with admin rights to run programs as an administrator.

(Optional) Change Icon

If you are not a fan of the default Command Prompt icon, you can customize the shortcut icon. Simply right-click on the shortcut and select “Properties”. Now, click on the “Change Icon” button, select your favorite icon and then click on the “Ok” button to apply it.

That is all. It is that simple to run Command Prompt commands with a desktop shortcut. If you like to keep your desktop clean then add the shortcut to the quick launch toolbar for quick access.

I hope that helps. If you are stuck or need some help, comment below and I will try to help as much as possible. If you like this article, do check out how to create a clear clipboard shortcut on desktop in Windows.

Previous Post
Next Post
Tip / Trick

How to run command prompt commands from a windows shortcutAny person who has to run command prompt commands very often in Windows can make use of shortcuts for them. Typing out the command prompt commands frequently becomes cumbersome. You begin to wonder if you could use some alternate methods to avoid this repeated typing by saving the command prompt commands and running it whenever you want. That is when shortcuts come into the picture.

What are Windows Desktop Shortcuts?

Windows desktop shortcuts provide you with an option to access executable files, folders, and applications quickly. You can also use the desktop shortcuts to run command prompt commands .

Difference Between Using Batch Files and Windows Desktop Shortcuts

Batch files can be used for running a series of command prompt commands with customization options. On the contrary, if you want to run a single or a simple command, then using Windows shortcuts is the best option and setting up a shortcut to run command prompt commands makes it even easier .

Steps to Create a Windows Shortcut to Run Command Prompt Commands

  1. To create a new shortcut to run command prompt commands on your desktop, right-click anywhere in the blank region on your desktop. Now, select the option New > Shortcut from the context menu.
  2. In the “New Shortcut” window, type the command that should be executed whenever the shortcut is run using the syntax as follows:

“C:\Windows\System32\cmd.exe” /k requiredcommand

Let us see what this command indicates:

  1. Here, the initial part “cmd.exe” indicates that the command prompt must be opened.
  2. The second part, /k is a flag that instructs the command prompt to issue the following command and remain open in order to see the results or type other commands. If you want the command prompt to close after the command is issued, the flag “/c” can be used instead of “/k”.
  3. The final part, “requiredcommand” is the actual command that you wish to execute or run.
  4. Click on the Next button.
  5. Type a suitable name for the shortcut and click on the Finish button.

That’s all. It is now possible for you to run command prompt commands from a shortcut easily by just double clicking on it instead of typing the command in the command prompt.

Redirecting Results to a File Through Shortcuts

You can also redirect the results of any command prompt command to another program file and then ensure that the command prompt window closes. For this you must use symbols like > and >>. For example, if you run the “requiredcommand” command and want to save the results in a file called abc.txt and then close the command prompt windows the following syntax can be used.

“C:\Windows\System32\cmd.exe” /c requiredcommand > “C:\Users\Default\Desktop\ abc.txt

If > is used, then Windows will create a new file if it does not exist. If the file exists, it will overwrite the contents of the file . If you do not want to overwrite the contents of the file, but just append the new results of the command to the existing data in the file, you must use the >> command.

Once the shortcut for redirecting results is ready, you can run the command any time you want by using the shortcuts. Thus, you can easily run command prompt commands from a Windows shortcut and save yourself a lot of typing.

To start, let’s explore how to open the command prompt using a Windows 10 shortcut. It won’t do anything right away; you’ll still have to manually type in the command you want to do. However, what we’ll cover here will act as the basis for the other commands we’ll cover in this article.

First, we need to create a CMD shortcut. To do this, right-click in an empty space in File Explorer or the desktop. Then, go to New > Shortcut.

When you click this, Windows 10 will immediately show a pop-up window asking for a location. In this window, type “C:\Windows\System32\cmd.exe” then click Next.

This is telling Windows to go into the system files and run the Command Prompt executable. If your Windows 10 installation is on another drive, replace the “C:\” with the drive you use for your OS.

Once you click Next, you can name the shortcut something memorable. Give it a name like “Open Command Prompt” and click Finish.

Now when you double-click your new shortcut, the command prompt appears.

Now that we’ve got the basics down, let’s learn how to make a CMD shortcut with a command built into it. If you want to make a new shortcut, repeat the steps above; however, if you want to edit the command you created previously, simply right-click it, click Properties, then add your new command under Target.

Now, let’s run a command via our shortcut. To do this, type “C:\Windows\System32\cmd.exe” /k followed by your command.

For example, “C:\Windows\System32\cmd.exe” /k echo hello world will tell the command prompt to print “hello world.”

You may notice the odd “/k” in the middle of the command. This tells the command prompt to run what we type after it, then stay open so that you can see the result.

If you prefer the command prompt to close as soon as it’s done, replace this /k with /c instead.

How to run command prompt commands from a windows shortcut

You can also chain multiple commands together. Just add an ampersand (&) between each command to chain them.

Now you have everything you need to run commands from a shortcut, whether you want to manually type the command or automatically run a pre-set one. As such, let’s take some time to explore some useful ways you can use this tool to make specific tasks easier.

If a website you visit goes down often, or you want to check the health of a remote server, the ping and tracert commands come in great use. Ping lets you see how fast your connection between you and the target is, while tracert lets you see each step in the connection.

To set up an automatic ping command, enter “C:\Windows\System32\cmd.exe” /k ping followed by your target.

For example, “C:\Windows\System32\cmd.exe” /k ping www.google.com will let you know how fast you can contact Google in milliseconds.

If you keep having DNS connection issues, why not set up an automatic shortcut that flushes your DNS cache? Just create a shortcut with “C:\Windows\System32\cmd.exe” /k ipconfig /flushdns and double-click it every time a DNS connection problem appears. You may even want to use /c for this command to close it once it’s finished.

Finally, did you know that you can log off, restart, and turn off your PC from the command prompt? They all use the same “shutdown” command, but the variables you give the command defines which action you wish to perform.

All of the following commands are activated with “C:\Windows\System32\cmd.exe” /k shutdown, so enter that regardless of what you want to do. Then, add one of the following arguments to the end:

  1. /l will log off the current user.
  2. /r will restart the computer.
  3. /r /o will restart the computer then boot back into the advanced startup options.
  4. /s will turn off the computer.
  5. /s /hybrid shuts down the PC, then prepares it for a fast startup.
  6. /h will put the computer into hibernation mode.
  7. /a cancels a current shutdown sequence, as long as it’s done during the time out period.
  8. /t, when placed after a shutdown (/s) or restart (/r) command, defines how many seconds the PC will wait before performing that activity. Add a number after the /t to define the time; for example, /r /t 100 will restart the PC after 100 seconds pass.

Is it possible to create a desktop shortcut that, when pressed, will open command prompt and run a pre-defined command?

9 Answers 9

Yes! You can create a shortcut to cmd.exe with a command specified after it. Alternatively you could create a batch script, if your goal is just to have a clickable way to run commands.

Steps:

Right click on some empty space in Explorer, and in the context menu go to “New/Shortcut”.

When prompted to enter a location put either:

” C:\Windows\System32\cmd.exe /k your-command ” This will run the command and keep (/k) the command prompt open after.

” C:\Windows\System32\cmd.exe /c your-command ” This will run the command and the close (/c) the command prompt.

Notes:

Tested, and working on Windows 8 – Core X86-64 September 12 2014

If you want to have more than one command, place an “&” symbol in between them. For example: ” C:\Windows\System32\cmd.exe /k command1 & command2 “.

How to run command prompt commands from a windows shortcut

How to run command prompt commands from a windows shortcut

Yes, make the shortcut’s path

  • %comspec% is the environment variable for cmd.exe’s full path, equivalent to C:\Windows\System32\cmd.exe on most (if not all) Windows installs
  • /k keeps the window open after the command has run, this may be replaced with /c if you want the window to close once the command is finished running
  • is the command you wish to run

The solutions turned out to be very simple.

Write the command, save as .bat.

Double click the file created and the command automatically starts running in command-prompt.

How to run command prompt commands from a windows shortcut

Create new text file on desktop;

Enter desired commands in text file;

Rename extension of text file from “.txt” –> “.bat”

How to run command prompt commands from a windows shortcut

Yes. One option you have is to create a batch file containing the command

The shortcut will then be to this batch file.

This is an old post but I have issues with coming across posts that have some incorrect information/syntax.

If you wanted to do this with a shorcut icon you could just create a shortcut on your desktop for the cmd.exe application. Then append a /K to the shorcut path.

So a default shorcut target path may look like “%windir%\system32\cmd.exe”, just change it to %windir%\system32\cmd.exe /k

example: %windir%\system32\cmd.exe /k powercfg -lastwake

In this case i would use /k (keep open) to display results.

Arlen was right about the /k (keep open) and /c (close)

You can open a command prompt and type “cmd /?” to see your options.

A batch file is kind of overkill for a single command prompt command.

Hope this helps someone else

I tried this, all it did was open a cmd prompt with “cmd -c (my command)” and didn’t actually run it. see below.

***Update
I changed my .bat file to read “cmd /k (powercfg /lastwake)” and it worked. You can also leave out the () and it works too.

You can also create a shortcut on desktop that can run a specific command or even a batch file by just typing the command in “Type the Location of Item” bar in create shortcut wizard

  1. Right click on Desktop.
  2. Enter the command in “Type the Location of Item” bar.
  3. Double click the shortcut to run the command.

Using the Drag and Drop method

  1. From the windows search bar type in cmd to pull up the windows bar operation.
  2. When the command line option is shown, right click it and select Open File Location .
  3. The file explorer opens and the shortcut link is highlighted in the folder. If it is not highlighted, then select it.
  4. Hold down the Control key and using the mouse drag the shortcut to the desktop. If you don’t see Copy to Desktop while dragging and before dropping, then push down and hold the Control key until you see the message.
  5. Drop the link on the desktop.
  6. Change properties as needed.

How to Open Command Prompt via Windows 10 Shortcut

To start, let’s explore how to open the command prompt using a Windows 10 shortcut. It won’t do anything right away; you’ll still have to manually type in the command you want to do. However, what we’ll cover here will act as the basis for the other commands we’ll cover in this article.

First, we need to create a CMD shortcut. To do this, right-click in an empty space in File Explorer or the desktop. Then, go to New > Shortcut.

When you click this, Windows 10 will immediately show a pop-up window asking for a location. In this window, type “C:\Windows\System32\cmd.exe” then click Next.

This is telling Windows to go into the system files and run the Command Prompt executable. If your Windows 10 installation is on another drive, replace the “C:\” with the drive you use for your OS.

Once you click Next, you can name the shortcut something memorable. Give it a name like “Open Command Prompt” and click Finish.

Now when you double-click your new shortcut, the command prompt appears.

How to Run a Command via Windows 10 Shortcut

Now that we’ve got the basics down, let’s learn how to make a CMD shortcut with a command built into it. If you want to make a new shortcut, repeat the steps above; however, if you want to edit the command you created previously, simply right-click it, click Properties, then add your new command under Target.

Now, let’s run a command via our shortcut. To do this, type “C:\Windows\System32\cmd.exe” /k followed by your command.

For example, “C:\Windows\System32\cmd.exe” /k echo hello world will tell the command prompt to print “hello world.”

You may notice the odd “/k” in the middle of the command. This tells the command prompt to run what we type after it, then stay open so that you can see the result.

If you prefer the command prompt to close as soon as it’s done, replace this /k with /c instead.

How to Run Multiple Commands via Windows 10 Shortcut

You can also chain multiple commands together. Just add an ampersand (&) between each command to chain them.

Examples of Useful Commands to Have As Shortcuts

Now you have everything you need to run commands from a shortcut, whether you want to manually type the command or automatically run a pre-set one. As such, let’s take some time to explore some useful ways you can use this tool to make specific tasks easier.

Ping or Trace the Route of a Specific Website or IP

If a website you visit goes down often, or you want to check the health of a remote server, the ping and tracert commands come in great use. Ping lets you see how fast your connection between you and the target is, while tracert lets you see each step in the connection.

To set up an automatic ping command, enter “C:\Windows\System32\cmd.exe” /k ping followed by your target.

For example, “C:\Windows\System32\cmd.exe” /k ping www.google.com will let you know how fast you can contact Google in milliseconds.

Flush the DNS Cache to Resolve Connection Issues

If you keep having DNS connection issues, why not set up an automatic shortcut that flushes your DNS cache? Just create a shortcut with “C:\Windows\System32\cmd.exe” /k ipconfig /flushdns and double-click it every time a DNS connection problem appears. You may even want to use /c for this command to close it once it’s finished.

Log Off, Restart, or Shut Down Your Computer

Finally, did you know that you can log off, restart, and turn off your PC from the command prompt? They all use the same “shutdown” command, but the variables you give the command defines which action you wish to perform.

All of the following commands are activated with “C:\Windows\System32\cmd.exe” /k shutdown, so enter that regardless of what you want to do. Then, add one of the following arguments to the end:

  1. /l will log off the current user.
  2. /r will restart the computer.
  3. /r /o will restart the computer then boot back into the advanced startup options.
  4. /s will turn off the computer.
  5. /s /hybrid shuts down the PC, then prepares it for a fast startup.
  6. /h will put the computer into hibernation mode.
  7. /a cancels a current shutdown sequence, as long as it’s done during the time out period.
  8. /t, when placed after a shutdown (/s) or restart (/r) command, defines how many seconds the PC will wait before performing that activity. Add a number after the /t to define the time; for example, /r /t 100 will restart the PC after 100 seconds pass.
  • You can open Command Prompt by right-clicking the Start icon.
  • Other ways to open Command Prompt include through the Start Menu and desktop search.
  • The most recent versions of Windows 10 have replaced Command Prompt with “PowerShell,” but you can still use Command Prompt.

If you’ve ever done any sort of coding , you’re familiar with the Command Prompt. The Command Prompt is an app installed on all Windows computers that lets you manage the computer using text commands.

But unlike other apps, the Command Prompt isn’t always easy to find. Here’s how to open Command Prompt on your PC , no matter which version of Windows 10 you have.

How to open Command Prompt in Windows 10

There are three main ways to access Command Prompt. Using the Power User Menu shortcut is the fastest method for most people.

Power User Menu

The quickest way to open a Command Prompt window is through the Power User Menu, which you can access by right-clicking the Windows icon in the bottom-left corner of your screen, or with the keyboard shortcut Windows Key + X.

It’ll appear in the menu twice: Command Prompt and Command Prompt (Admin). The second option will open an “elevated” Command Prompt, which gives you administrator privileges, which are required for some commands. In nearly all cases, it’s better to use the elevated Command Prompt – it can do everything that the normal Command Prompt can and more.

Note: In newer versions of Windows, Command Prompt has been replaced with Windows PowerShell. If you still want access to Command Prompt, check out our step-by-step instructions below.

Windows Search

If you right-click Command Prompt and select Run as administrator or click it in the results, you’ll open an elevated Command Prompt.

Quick tip: The Command Prompt is sometimes referred to as “cmd prompt,” or simply “cmd.” When searching for Command Prompt, you can also just search for “cmd.”

Start Menu

You can also open Command Prompt by navigating through the Start menu.

To open Command Prompt through the Start menu, click the Windows icon and then scroll down to find the Windows System folder. Open the folder and click or right-click Command Prompt to open it.

How to switch from PowerShell to Command Prompt

Windows PowerShell is a newer program that’s similar to Command Prompt. And in some versions of Windows 10, it replaces Command Prompt in the menus you’d usually use to open it.

There’s nothing wrong with PowerShell – it can do pretty much anything that the Command Prompt can do – but if you’re used to using Command Prompt, it’s easy to switch back.

1. Press the Windows Key + I to open the Settings app, and then select Personalization.

2. Click the Taskbar option in the left sidebar.

3. On the page that appears, head down to the Replace Command Prompt with Windows PowerShell option and click its slider so it turns Off.

If you often need to launch the command prompt as Administrator, you can save your time and create a special shortcut. In Windows 10, it is possible with two different methods. Let’s see how it can be done.

Method 1. Modify a regular shortcut

  1. Right click Desktop and select New – Shortcut from the context menu.
  2. Type cmd.exe in the Target box.
  3. Finish the New shortcut wizard. Right click the shortcut you created and select “Properties” in the context menu.
  4. On the Shortcut tab of the Properties window, click the Advanced button.
  5. Tick the checkbox “Run as Administrator” as shown below:

The only problem is that every time you click this shortcut, it asks for a UAC confirmation:

This can be annoying. The second method does not have this issue.

Method 2. Use Task Scheduler
To skip the UAC prompt and start cmd.exe elevated, you need to create a special task in the Windows Task Scheduler which allows executing apps with admin privileges. The Task Scheduler has a graphical MMC version (taskschd.msc) which we will use.

The step-by-step instructions are pretty long. Thankfully, I have covered it already here:

Follow these instructions to create the following task and run it using the console tool schtasks:

To save your time, you can use Winaero Tweaker. The feature called “Elevated Shortcut” does everything mentioned above and helps you to create elevated shortcuts quickly.

  1. Download and unpack the Winaero Tweaker app.
  2. Go to Tools \ Elevated Shortcut:
  3. Create a shortcut using its friendly user interface and you are done!

Also, there is another good thing about Winaero Tweaker. By default Task Scheduler run all tasks at Below Normal process priority. But Winaero’s Elevated Shortcut fixes this by running the shortcut at Normal priority.

Winaero greatly relies on your support. You can help the site keep bringing you interesting and useful content and software by using these options:

If you like this article, please share it using the buttons below. It won’t take a lot from you, but it will help us grow. Thanks for your support!

Author: Sergey Tkachenko

Sergey Tkachenko is a software developer who started Winaero back in 2011. On this blog, Sergey is writing about everything connected to Microsoft, Windows and popular software. Follow him on Telegram, Twitter, and YouTube. View all posts by Sergey Tkachenko

How to Create an Administrator Command Prompt Shortcut

This tip works on Windows 8.1, Windows 10, and Windows 11

While Windows 10 tries to encourage you to use Widnows PowerShell and Windows 11 puts Windows Terminal front and center, most Windows users are more familiar and more comfortable with the good old Command Prompt. The Command Prompt is a powerful and handy tool for most Windows users. But many commands and functions require elevated privileges – i.e. running it as administrator.

This tutorial will show you how to create a Command Prompt desktop shortcut with administrator privileges… so all you have to do is click it to run any command even those which require you to run them as an administrator.

Let’s get started!

Right-click on an empty space on your desktop and click “New” > “Shortcut”. Under “Type the location of the item” enter the following:

C:\Windows\System32\cmd.exe

Then click “Next”…

How to run command prompt commands from a windows shortcut

Give your shortcut a name… we suggest you name it Command Prompt.

How to run command prompt commands from a windows shortcut

Right-click the shortcut now on your desktop and choose “Properties”.

How to run command prompt commands from a windows shortcut

In the Command Prompt Properties dialog, click the Advanced tab.

How to run command prompt commands from a windows shortcut

In the “Advanced Properties” dialog, tick the box next to “Run as administrator”. Then click “OK”.

How to run command prompt commands from a windows shortcut

Click “Apply”, “OK” in the Command Prompt Properties dialog and then close the dialog

How to run command prompt commands from a windows shortcut

Now you have a handy desktop shortcut that will open a Command Prompt with administrator privileges.

Want the new shortcut on your taskbar and/or Start menu. No problem! Just right-click your new shortcut and choose Pin to taskbar or Pin to Start.

Note to Windows 11 users.

When you right-click items (as above) you’ll need to choose “Show more options” in the right-click menu to get to “Properties” and “Pin to taskbar”, and “Pin to Start”.

If you’ve ever done any sort of coding, you’re familiar with the Command Prompt. The Command Prompt is an app installed on all Windows computers that lets you manage the computer using text commands.

But unlike other apps, the Command Prompt isn’t always easy to find. Here’s how to open Command Prompt on your PC, no matter which version of Windows 10 you have.

How to open Command Prompt in Windows 10

There are three main ways to access Command Prompt. Using the Power User Menu shortcut is the fastest method for most people.

Power User Menu

The quickest way to open a Command Prompt window is through the Power User Menu, which you can access by right-clicking the Windows icon in the bottom-left corner of your screen, or with the keyboard shortcut Windows Key + X.

It’ll appear in the menu twice: Command Prompt and Command Prompt (Admin). The second option will open an “elevated” Command Prompt, which gives you administrator privileges, which are required for some commands. In nearly all cases, it’s better to use the elevated Command Prompt — it can do everything that the normal Command Prompt can and more.

Note: In newer versions of Windows, Command Prompt has been replaced with Windows PowerShell. If you still want access to Command Prompt, check out our step-by-step instructions below.

Windows Search

If you right-click Command Prompt and select Run as administrator or click it in the results, you’ll open an elevated Command Prompt.

Quick tip: The Command Prompt is sometimes referred to as “cmd prompt,” or simply “cmd.” When searching for Command Prompt, you can also just search for “cmd.”

Start Menu

You can also open Command Prompt by navigating through the Start menu.

To open Command Prompt through the Start menu, click the Windows icon and then scroll down to find the Windows System folder. Open the folder and click or right-click Command Prompt to open it.

How to switch from PowerShell to Command Prompt

Windows PowerShell is a newer program that’s similar to Command Prompt. And in some versions of Windows 10, it replaces Command Prompt in the menus you’d usually use to open it.

There’s nothing wrong with PowerShell — it can do pretty much anything that the Command Prompt can do — but if you’re used to using Command Prompt, it’s easy to switch back.

1. Press the Windows Key + I to open the Settings app, and then select Personalization.

2. Click the Taskbar option in the left sidebar.

3. On the page that appears, head down to the Replace Command Prompt with Windows PowerShell option and click its slider so it turns Off.

Microsoft created Windows operating system with beautiful interfaces from the simple Disk Operating System (DOS). Still most of the people are convenient in using Command Prompt to get things done. Because it is very difficult to navigate through hundreds of thousands of options available in Windows 10. Due to this fact, Microsoft also offers a quick option using Run command box to open programs and get things done in Windows. In this article, let us show you how to use Run command and top 10 Run commands for Windows 10 that will make your task easy.

Opening Run Prompt

Run command is part of BASIC programming language used for starting a program. In Windows, people uses Run command to quickly open apps and documents. Simply press ‘Win + R’ shortcut keys to open the Run prompt.

How to run command prompt commands from a windows shortcut

Run Command in Windows 10

You can enter any application name or folder or document in the ‘Open’ text box. Hit enter key to open the app or document. You can also open websites by entering the full URL like https://www.webnots.com.

Remember, you should enter the correct name of the app or folder, otherwise Windows will throw you an error like below.

Run Command Error

Adding Run Command in Menu or Taskbar

Click on ‘Start’ button and go to Windows search box or use Cortana search box. Enter ‘run’, you will see ‘Run’ desktop app showing as first option.

How to run command prompt commands from a windows shortcut

Add Run Command to Desktop and Taskbar

Right click on ‘Run option and select ‘Pin to Start’ to add the Run menu item in the start menu. Otherwise choose ‘Pin to Taskbar’ to add it in taskbar for quick access.

Open Command Prompt as an administrator in Windows 11, 10, 8, 7, and Vista

How to run command prompt commands from a windows shortcut

How to run command prompt commands from a windows shortcut

  • Tweet
  • Share
  • Email
  • Tweet
  • Share
  • Email

What to Know

  • Windows 11, 10 or 8: Open Task Manager. Go to File >Run new task.
  • In the Create new task window, type cmd in the Open text field and check the Create this task with administrative privileges box.
  • Choose OK and follow any User Account Control requirements.

This article explains how to open an elevated Command Prompt in Windows 11, 10, or 8. It also includes instructions for Windows 7 and Vista, along with additional information on why you need an elevated Command Prompt and how to tell whether you have administrator privileges.

How to Open an Elevated Command Prompt in Windows 11, 10, or 8

If you’re using a keyboard with Windows 11, Windows 10, or Windows 8, you can open an elevated Command Prompt quickly from the Power User Menu. Just use the WIN+X keyboard shortcut and then select Windows Terminal (Admin) (in Windows 11) or Command Prompt (Admin) (in Windows 10/8). Choose Yes on any User Account Control messages that might appear.

Depending on your settings and Windows configuration, Command Prompt may be replaced by Windows Powershell. If you’re using Windows 11, the option in the Power User Menu is for Windows Terminal; you can get to Command Prompt after opening that program.

Open Task Manager. The quickest way, assuming you’re using a keyboard, is via CTRL+SHIFT+ESC but there are several other methods outlined in that link. One easy way is to type the app name into Cortana’s search field.

How to run command prompt commands from a windows shortcut

Go to File > Run new task.

How to run command prompt commands from a windows shortcut

Don’t see the File menu? You may first have to select More details at the bottom of the Task Manager window to show a more advanced view of the program, including the File menu.

In the Create new task window you see now, type the following in the Open text field:

. but don’t do anything else just yet!

Check the Create this task with administrative privileges. box.

How to run command prompt commands from a windows shortcut

Don’t see this box? That means that your Windows account is a standard account, not an administrator account. Your account must have administrator privileges to be able to open an elevated Command Prompt this way. Follow the Windows 7/Vista method below, or try the tip just below these instructions.

Choose OK and then follow any User Account Control requirements that might appear next. An elevated Command Prompt window will now appear, allowing unrestricted access to executing commands.

Feel free to close Task Manager. It does not need to remain open to use Command Prompt.

How to Open an Elevated Command Prompt in Windows 7 or Vista

Locate the Command Prompt shortcut, usually in the Accessories folder in the Start Menu.

If you’re having trouble finding it, see How to Open Command Prompt (the non-elevated kind). But first, there’s an intermediate step you need to take.

Right-click it and choose Run as administrator.

Accept any User Account Control messages or warnings.

An elevated Command Prompt window should appear, allowing access to commands that require administrative level privileges.

When Do You Need an Elevated Command Prompt?

Some commands available in Windows require that you run them from an elevated Command Prompt. Basically, this means running the Command Prompt program (cmd.exe) with administrator-level privileges.

You’ll know if you need to run a particular command from within an elevated Command Prompt because it’ll clearly tell you that in an error message after running the command.

For example, when you try to execute the sfc command from a normal Command Prompt window, you’ll get the “You must be an administrator running a console session in order to use the sfc utility” message.

Try the chkdsk command and you’ll get an “Access Denied as you do not have sufficient privileges or the disk may be locked by another process. You have to invoke this utility running in elevated mode and make sure the disk is unlocked” error.

Other commands give other messages, but regardless of how the message is phrased, or what Command Prompt command we’re talking about, the solution is simple: open an elevated Command Prompt and execute the command again.

More About Elevated Command Prompts

Don’t let all the discussion above convince you that you should, or need to, run Command Prompt as an administrator for most commands. For almost all Command Prompt commands, no matter what version of Windows, it’s perfectly okay to execute them from a standard Command Prompt window.

To be able to open an elevated Command Prompt window, either a) your Windows user account must already have administrator privileges, or b) you must know the password to another account on the computer that has administrator privileges. Most home computer user’s accounts are set up as administrator accounts, so this isn’t usually a concern.

How to Tell if You Have Administrator Privileges

There’s a very easy way to tell if the Command Prompt window you’ve opened is elevated or not: it’s elevated if the window title says Administrator; it’s not elevated if the window title just says Command Prompt.

An elevated Command Prompt window opens to the system32 folder. A non-elevated Command Prompt window instead opens to the user’s folder: C:\Users\[username].

If you plan on frequently using an elevated Command Prompt then you should consider creating a new shortcut to Command Prompt that automatically starts the program with administrator-level access. See How to Create an Elevated Command Prompt Shortcut if you need help.

In Windows XP, users have Administrator privileges by default. When you open a Command Prompt in XP it will be elevated unless you have another type of profile.

Home » SysAdmin » How to Connect to MySQL from Windows Command Line

MySQL is a popular and open-source relational database application. Therefore, many servers make use of MySQL. The way you access the database depends on the operating system from which you are working.

This guide walks you through using the Windows Command line to connect to a MySQL database.

How to run command prompt commands from a windows shortcut

  • A Windows-based system with an administrator account
  • A local installation of MySQL
  • Notepad text editor (optional)

Starting MySQL from the Windows Command Line

Step 1: How to Open a Windows Command Prompt

Start by opening the Run command box in Windows. Use the keyboard shortcut – hold the Windows (super) key and press the letter R (Win+R).

Then, type in cmd and press Enter. This command opens the Windows command line.

How to run command prompt commands from a windows shortcut

A black command line interface should launch, with white text and a cursor for you to type.

How to run command prompt commands from a windows shortcut

Step 2: Verify MySQL is Running on Windows

Next, run the command to display a list of all the services that are currently running. Enter the following in the command prompt:

How to run command prompt commands from a windows shortcut

If MySQL is not on the list, you can start it using the Services panel. Enter the following command:

A new window will launch and display the list of services available on your system. Scroll down to find MySQL, and check the status column. Left-click the MySQL service to highlight it, then right-click to open a context menu. Finally, left-click on start.

Step 3: Connect to a Local MySQL Server

First, start MySQL in Windows using the following command:

Replace [username] with the username for your MySQL installation.

Enter mysql.exe -uroot -p , and MySQL will launch using the root user.

MySQL will prompt you for your password. Enter the password from the user account you specified with the –u tag, and you’ll connect to the MySQL server.

The command prompt changes to look like this:

Change to the MySQL folder, use the cd command:

The command prompt should change to mysql> letting you know you’re currently in the MySQL folder.

To list the contents of this folder:

This lists the contents of the current folder. One of the folders will display the version number of your MySQL installation.

For example, if you’ve installed MySQL 5.5, you should see a folder named “MySQL Server 5.5”.

Step: 4 Create Windows Shortcut to Login to MySQL

  1. To create a shortcut in Windows, enter the following in the command line:
  1. Open the Windows Notepad text editor with the command:

Replace -uroot with -u[username] if you have a different username, and -ppassword with -p[YourActualPassword] .

Also, make sure you change the path from MySQL Server X.X to the actual folder location.

  1. Now, press Ctrl-S to launch a Save dialog.
  1. Then, type “mysql.bat” in the name field, and change the location to your desktop (or another place that’s easy to find).

This creates a small Windows executable file that you can double-click to log into MySQL using the specified username and password.

With the help of this simple guide, you should be able to connect to a MySQL database using the Windows command prompt. Once you’ve logged into the MySQL server, the commands will be the same regardless of what kind of system you’re running on.

If you are searching for an alternative, terminal-based solution, try out using PostgreSQL from command line.

#Keyboard ninja
The Cogitator

Monday, 27 July 2020

Are you tired of mouse clicks? Do you often leave the keyboard to simply move your mouse around to look for a Microsoft application to open? In this article, we shall draw the keyboard closer to us when opening any Microsoft application by availing the commands that you can put in the run command prompt to open MS word, MS excel, MS PowerPoint, MS publisher, MS access, and MS outlook without any mouse click.

I am pretty sure that your business or you personally use Microsoft packages so often to create documents. These documents include reports, proposals, shopping lists, etc. Knowing simple keyboard shortcuts can increase your efficiency. That’s why in this article we shall cover how to start up MS Word, MS Excel, MS PowerPoint, MS Publisher, and MS access from the run command prompt with simple commands which will remain part of you forever. This will require no mouse.

There are many methods that you can use to start any Microsoft office application. These include; from the start, from the pinned application on the taskbar or by simply opening an existing file with that application, and finally from the run command prompt. But all startup methods essentially do the same thing. They run the application’s .exe file behind the scene, even if you don’t explicitly type the command or even see it.

Since Windows comes bundled with both Graphical User Interface and command line, it would be better to know how the most important applications are opened in both. This will help us reduce the time we spend performing some tasks or possibly looking for an application from the interface, yet we can easily enter the command prompt and carry on with the task at hand.

So, how do I go to the run command?

Opening the run command prompt is quite simple. If you have ever checked the properties of your computer using dxdiag command, then you should be well versed with the run command already.

To go to run command prompt, hold down the Windows key on your keyboard and press R. A window appears at the bottom left corner of the screen with a message ‘Type the name of a program, folder, document, or internet resource and windows will open for you ’ as shown below.

How to run command prompt commands from a windows shortcut

That’s simple and cool, right? From here you only need to memorize the command you need to open the application of interest and type in the input and finally, hit enter or click on okay.

Let’s get started with the commands to open the various office packages and MS outlook

Most of us fear commands but don’t be afraid of these commands because they are derived from the application names themselves as we shall witness. Theories are done but remember, we have now opened the run command window and all the commands will be put at this level. Therefore, if you closed yours, please open it again by pressing windows key + R.

Commands to open Microsoft word

Type winword and hit enter on your keyboard. The run command prompt is not case sensitive, meaning that WINWORD or WiNwOrD will all work. It does not care about the case of the word but the spelling of the word, therefore, you should be careful with the spelling to avoid unnecessary errors.

Note: since all startup methods run the app’s .exe file, typing winword.exe will still cause no error. It will open Word for you. You should be able to see the interface shown in the image below.

How to run command prompt commands from a windows shortcut

Commands to open Microsoft excel

Type excel and hit enter on your keyboard. Typing EXCEL or ExCeL will all work because the prompt is not case sensitive as hinted earlier. You should be able to see the interface shown in the image below.

Note: Typing excel.exe will cause no error. Refer to the note under commands to open word for more explanation

How to run command prompt commands from a windows shortcut

Commands to open Microsoft PowerPoint

Type powerpnt and hit enter on your keyboard. Mark the spelling of ‘powerpnt’, point has been shortened to ‘pnt’. Typing powerpoint will result in an error, so, stick to what I have given. You should be able to see the interface shown in the image below.

Note: Typing powerpnt.exe will open PowerPoint for you as well. Refer to the note under commands to open word for more details.

How to run command prompt commands from a windows shortcut

Commands to open Microsoft Publisher

Type mspub or mspub.exe to directly run the .exe file of the publisher application. Hit enter on your keyboard to finish the process. You should be able to see the interface shown in the image below.

How to run command prompt commands from a windows shortcut

Commands to open Microsoft Access

Type msaccess or msaccess.exe and hit enter on your keyboard. You should be able to see the interface shown in the image below.

How to run command prompt commands from a windows shortcut

Commands to open Microsoft Outlook

Type outlook or outlook.exe and hit enter on your keyboard. You should be able to see the interface shown in the image below.

How to run command prompt commands from a windows shortcut

That’s it. You are now a keyboard ninja. So, open all MS office packages from the run command. At first, it looks time-consuming but I find it faster because I love my keyboard more than my mouse.

If you need to run command prompt commands regularly in Windows, it may be useful to save the command somehow so that you can run it whenever the need arises without having to type it all out again.

While you can use batch files for that, it is also possible to use shortcuts instead. The core difference between the two options is that you can only run a single command using shortcuts while you can run a series of commands and get better customization options when using batch files.

Adding commands as desktop shortcuts in Windows is a straightforward easy process that requires zero knowledge of batch files and little knowledge about the commands you want to run.

Basically, you are using the command %comspec% /k for that followed by the command that you want to run. For instance, if you wanted to display the contents of drive c you would use the command %comspec% /k dir c: for that.

Comspec is a system variable that defines the command interpreter used on the system. If you have not modified that, cmd.exe is being used. The k parameter of cmd.exe keeps the execution window open after running the command. If you don’t require that, you may replace it with /c which terminates it.

Adding the shortcut

To add a new shortcut, right-click on a blank spot on your desktop and select New > Shortcut from the context menu.

How to run command prompt commands from a windows shortcut

Type the command that you want executed whenever you run the shortcut, for instance %comspec% /k dir c: or any other command in that format.

How to run command prompt commands from a windows shortcut

Click the next button and name the shortcut. The default name is set to cmd.exe which you may want to change, especially if you want to add multiple command prompt shortcuts on the system.

Once done run the shortcut to verify that it is working correctly. It is easiest with the /k parameter as you see the output in the command prompt window. Once you have verified the correctness, you may remove the /k parameter if you don’t need to see the output on the screen.

Closing Words

Using shortcuts to run commands on the command prompt can be quite useful, for instance if you need to run a command regularly. This can be something simple as the directory command listed above but also advanced commands that turn features on or off for example.

Now You: Have another tip? Feel free to share it with everyone else in the comment section below.

Steps To Run Command Prompt Commands From Desktop Shortcuts:- You might be a Command Prompt lover. But there could definitely be some commands that you use on a frequent basis and opening Command Prompt and executing these commands every single time would actually make you go nuts. Is there a solution for this? Yes, of course, there is. You could pack in all your frequently used Command Prompt commands in a single shortcut and double click on this shortcut whenever you want to execute these commands. Yeah, as simple as that. Let’s see the various methods using with you can achieve this. What are you waiting for then? Let’s get started, shall we?

Execute Single CMD Command Through Desktop Shortcut

STEP 1 – Right click on an empty space anywhere on your Desktop screen. From the context menu that appears, click on New and then on Shortcut options.

  • You need to give the location of the item in the window that follows.
  • Type in or copy paste
  • Please refer to the following screenshot if you have any doubts. For example lets say you have to create a desktop shortcut for ipconfig command. So, we will write C:WindowsSystem32cmd.exe /k ipconfig in the location of the item.
  • As next, give your shortcut a name. In the given screenshot, I have named the shortcut as Merabheja Command. Hit the Finish button when you are done.
  • Simply double click on your newly created shortcut to execute your command. That’s it.
  • Now you can see your command executed in the Command Prompt.

Execute Multiple CMD Commands From A Single Shortcut

If you wish to execute multiple CMD commands through a single desktop shortcut, you can even accomplish that. For that you need to follow the same steps as described above. When giving the location of the item, you can type in multiple commands separated by ampersands(&) to execute them one by one from a single shortcut.

How to run command prompt commands from a windows shortcut

Execute CMD Commands Through Batch Files

  • You need to launch the Notepad first. Simply type in your commands one by one and add a pause at the end. Otherwise the CMD would close abruptly once the commands are executed.
  • Once you are all done, save the file as a batch file. You can give any name for your file as per your choice. But make sure that the extension for your file is .bat. Now you can just go to the location where this batch file is saved and double click on it to execute your commands. That’s it.

What To Do If The Command Is not Recognized When You Double Click On A Batch File To Execute A Command?

  • Sometimes when you create a batch file and double click on it, the CMD would open, but you would receive a message saying that the command is not recognized. In such a case, you need administrative privileges to run the command embedded in the batch file. For that, create a shortcut of the batch file in question by right clicking on it and then by clicking on the Create shortcut option.
  • Once the shortcut is created, right click on it and choose the Properties option.
  • As next, click on the Advanced button under the Shortcut tab as shown in the screenshot given below.
  • Now check the checkbox corresponding to the Run as administrator option and hit the OK button. That’s it. Now try double clicking on the newly created shortcut and see if it is working fine.

Hope you found the article useful. If you have any doubts regarding any of the steps, please feel free to leave comments, we would be happy to help. Stay tuned for more useful tricks, tips, and hacks.

by Jamil Parvez 14/09/2021, 11:09 am 458 Views

In this article, we will learn how to open the Run command in Windows. The Run command window permits you to launch apps/programs, open files/folders, and access internet resources in Windows. Just enter a path or a quick command into the Windows Run box, and then hit the ok button use a Run command.

Open Run command with a keyboard shortcut

The fastest way to launch the Run command window is to use the Windows key + R. Just hold down the Windows key and then hold the R on your keyboard.

Launch Run Command Using Windows Search

If you are using Windows 11, in the search bar just type the run then select run App to open it.

Opening the Run command using the Start Menu

In Windows 11, select the Start Menu button and then All apps.

Scroll down, and then click on Windows Tools.

Using the Command Prompt to launch the Run window

To launch the Windows Run, you can also open the command prompt and then enter the following command.
explorer.exe Shell.

Watch Video: How to Open Run Command in Windows

Launch the Run command using PowerShell

Open the powershell command and then, type or copy/paste the below command.
(New-Object -ComObject “Shell.Application”).FileRun()

Using the Windows menu to run the Run command

Right-click on the Windows start button and then click or tap on Run to open it.

Newsletter

Written by Jamil Parvez

Jamil Pervez works as a Network Administrator, based in Kuwait with a Primary focus on Microsoft technologies. Microsoft Certified MCSE, MCTP, MCITP, CCNP, CCIP, CCVP with 20 years of experience in administering Windows Servers, Exchange, VMWare, Veeam B&R, Veritas BackupExec.

Learn how to open Local users and Groups console from Run window. In this console, administrators can perform operations like creation/deletion of user accounts, resetting user password etc.

Execute the command lusrmgr.msc to open user accounts window from Run.

However, on Windows XP we need to run a different command.

On XP: nusrmgr.cpl

Also, we can use Netplwiz from Run window to launch user accounts window which shows only the local user accounts on the system.
If you are looking for a way to manage user accounts from command line then see the below posts.

It worked for me. In my machine i was unable to find “User Account” Shortcut. SO was searching it to open it from Run Window. Thanks for the Stuff.

How do you do it with windows 7. I tried the ‘nusrmgr.cpl’ to no avail.

This is changed in Windows 7. You can run compmgmt.msc and manage user accounts from there.

Run “control nusrmgr.cpl”

command to open user accounts is “LUSRMGR.MSC”

nusrmgr.cpl works for XP where as lusrmgr.msc works for Windows 7. Updated the post for Windows 7.

I have unintentionally closed (forced) exlorer.exe on a remote server & now I am unable to run explorer.exe back. It gives me blank screen everytime I try to login. It is a remote server (Windows 7). I need to access it urgently as I was treoubleshooting something.

Thanks in advance.

If explorer is killed, it can be restarted by running ‘explorer’ from command prompt. But I’m not sure if you have access to command window.

Press alt+ctrl+delete to open task manager and click on new task and type explorer.exe

hi everyone,
i have create the user accounts through lusrmgr in windows server 2012R2 but there is no user account at logon screen. thanks
regards,
Mohsin khan

Hello Mohsin, when a new user local or domain is created the first time you login, the user needs to invoked by clicking on the left lower corner and choose other user. for a domain user the user name will work, for a local user type .\user-name (.\ translates to local machine)

Hi , in an enterprise environment , how can I find out to how many computers one user is logged in ? Sometimes users have frequent account lock out for logging to more than one computer , is there a site that I can find out logs for the computers that the effected user logged in to ? thanks so much

September 27, 2021

Copy to Clipboard

Microsoft Windows offers many advanced features to help your computer run smoothly. The command prompt application is one such feature, and you can use it to run specific commands for the system or even launch applications and run .exe type files. Understanding what the command prompt is and how to use it to run a file can help you navigate computer issues or launch files with administrative privileges. In this article, we explain what the command prompt application is and how to run a file in command prompt in four easy steps.

What is the command prompt app?

The command prompt app is a Microsoft Windows command interpreter application that allows users to execute commands on specific files, programs or features by using command lines. Command lines are short lines of code that interact with the files or programs. Users often utilize the command prompt app to force programs to run, to troubleshoot specific Windows features or launch .exe files with administrative privileges. Using the command prompt can require some basic coding knowledge and an understanding of the Windows operating system layout.

How to run a file in command prompt

Running a file in command prompt requires specific steps to locate and launch the file successfully. Follow these four steps to run a file in command prompt:

1. Open command prompt

There are several ways to open the command prompt app. The app is a standard feature in Windows, and you can open it using any of the following ways:

Keyboard shortcuts: Press the “Windows logo” key and “R” on your keyboard at the same time and then type “CMD” into the search bar. Alternatively, you can press the “Windows logo” key and “X” simultaneously and press the “Command Prompt (Admin)” in the power menu.

Search menu: Press the “Windows logo” key on your keyboard or click on the bottom left-hand corner of your operating system screen where the Windows logo appears. This opens a menu of your applications, and you can search for command prompt by typing “command prompt” into the search bar.

File explorer: You can navigate to a specific file pathway in your hard drive to find and run command prompt. Try this pathway: C: \ Windows \ System32.

2. Open the file pathway

To open the correct file, direct the command prompt app to the correct file path in your Windows by using this command template: cd [ file path ] . Ensure you’re using lowercase letters and that you include a space between cd and the file path. The bracketed file path in the command template is a placeholder for the specific pathway where your .exe file resides. For example, if you want to run a program within Microsoft Office, you’d type in the following command:

cd C: \ program files \ Microsoft Office

Press the “Enter” key once you verify the correct pathway for your .exe file. The command prompt typically responds by duplicating the file pathway on the next line if you entered the pathway correctly. Consider the details of your pathway for accuracy, including backslashes and spelling.

3. Execute the file

Because you’ve already opened the file’s directory pathway, you can next command the file to run using its .exe file, which is the executable file that allows a specific program to run. At the end of the file’s directory pathway, form your command using this command template: start [ file name ending in .exe ] . For example, if you’re running your computer’s antivirus software, your command line might look similar to this:

cd C: \ program Files \ antivirus \ application

C: \ program Files \ antivirus \ application start antivirus.exe

After you enter the .exe file name, press “Enter” on your keyboard. This automatically executes the .exe file and launches the program attached to the executable file. If your program doesn’t automatically launch, check your command lines for accuracy, including the exact name of your file, as issues can be easily resolved.

4. Launch and use your file

After you press the “Enter” key, your program launches, and you can begin using it. There are a variety of situations in which using a command prompt to launch your application can be helpful. It can help you find .exe files you don’t have attached to your taskbar or saved on your desktop. Sometimes, a program can install within an incorrect directory, and the command prompt can help you find it and launch it. And some programs require administrative privileges, so using the command prompt app with elevated privileges helps you launch these programs.

Basic command prompt commands

The command prompt tool has many other functions. Here are some standard command prompt commands and how you can use them with Windows:

Dir command

The dir command, or “directory” command, allows you to see everything listed in a particular directory. This can include folders, files and important details about each item, such as modification data and memory size. You can use this command to find or launch specific files within hidden or local directories. For example, you can use the command “C: \ > dir” to display the contents of your computer’s “C drive.” This command works for external or internal drives.

Ipconfig command

This command can help you troubleshoot any network problems your computer may experience. The ipconfig command displays information about the network the computer connects to, including your computer’s IP address, subnet mask and default gateway. You can use the command for troubleshooting, opening ports in your computer’s network or customizing your network with specific permissions or tasks.

Chkdsk command

The chkdsk command is a useful command for checking the health and status of a particular disk drive. It can identify specific errors in hard drives and is also useful for fixing certain errors, though the severity of the error may limit the command’s ability to resolve the problem. The chkdsk command is available in all versions of Windows and works with both external and internal hard disk and solid state drives.

Please note that none of the companies mentioned in this article are affiliated with Indeed.

Launch CMD in boot screen!

How to run command prompt commands from a windows shortcut

Compared to all other desktop operating systems, Windows 10 offers you more features. For example, by default, the operating system offers you a troubleshooting utility, disk check utility, System file checker (SFC) utility, and more.

Also, Windows 10 has a command-line interpreter that interacts with the user through a command-line interface. Command Prompt in Windows 10 is of great use; you can execute commands for many tasks.

On techviral, we have already covered a guide on the best CMD commands for Windows 10 operating system. Command Prompt can also help you fix various things like executing the SFC command to check system files, disc check command to fix disk errors, and more.

Certain situations demand running Command prompt at boot in Windows 10. For example, we often need to run Windows Command Prompt at the installation screen during maintenance and recovery. Similarly, while installing Windows 10, users might need to convert the GPT partition to MBR, which is only possible through CMD.

Steps to Open CMD (Command Prompt) at Boot in Windows 10

So, in this article, we will share two different methods to open Command Prompt at boot in Windows 10. Let’s check out.

1. Running CMD during Windows 10’s Setup

If you want to run a command prompt at the Windows 10’s setup page, you need to follow the steps given below.

Step 1. First of all, boot from the Windows installation media sticks with Windows Setup.

How to run command prompt commands from a windows shortcut

Step 2. Now on the Setup screen, press the Shift Key + F10 button.

Step 3. This will launch the Command Prompt Window.

How to run command prompt commands from a windows shortcut

That’s it! Now you can utilize the Command Prompt to format the hard disk or convert the hard disk partition.

2. Open Command Prompt at Boot using Advanced Startup

In this method, we will use the Advanced Startup options to open Command Prompt at boot. Follow some of the simple steps given below.

Step 1. First of all, open the Start menu and click on the ‘Shutdown‘ button.

Step 2. Now hold down the Shift key and click on the ‘Restart‘ option.

How to run command prompt commands from a windows shortcut

Step 3. Windows 10 will restart, and the Advanced Startup Options screen will appear.

Step 4. Click on the ‘Troubleshoot‘ option.

How to run command prompt commands from a windows shortcut

Step 5. On the Troubleshoot page, click on the ‘Advanced Options’

How to run command prompt commands from a windows shortcut

Step 6. On the Advanced Options page, click on the ‘Command Prompt’

How to run command prompt commands from a windows shortcut

That’s it! You are done. This is how you can use the Advanced Startup option to open the Command prompt at boot.

So, this guide is all about how to open Command Prompt at boot in Windows 10 computer. I hope this article helped you! Please share it with your friends also. If you have any doubts related to this, let us know in the comment box below.

Summary

This article describes how to run Control Panel tools in Windows by typing a command at a command prompt or in the Open box.

More Information

To run a Control Panel tool in Windows, type the appropriate command in the Open box or at a command prompt.

NOTE: If you want to run a command from a command prompt, you must do so from the Windows folder. Also, note that your computer may not have all of the tools listed in this article, as your Windows installation may not include all of these components.

Control panel tool Command
—————————————————————–
Accessibility Options control access.cpl
Add New Hardware control sysdm.cpl add new hardware
Add/Remove Programs control appwiz.cpl
Date/Time Properties control timedate.cpl
Display Properties control desk.cpl
FindFast control findfast.cpl
Fonts Folder control fonts
Internet Properties control inetcpl.cpl
Joystick Properties control joy.cpl
Keyboard Properties control main.cpl keyboard
Microsoft Exchange control mlcfg32.cpl
(or Windows Messaging)
Microsoft Mail Post Office control wgpocpl.cpl
Modem Properties control modem.cpl
Mouse Properties control main.cpl
Multimedia Properties control mmsys.cpl
Network Properties control netcpl.cpl
NOTE: In Windows NT 4.0, Network
properties is Ncpa.cpl, not Netcpl.cpl
Password Properties control password.cpl
PC Card control main.cpl pc card (PCMCIA)
Power Management (Windows 95) control main.cpl power
Power Management (Windows 98) control powercfg.cpl
Printers Folder control printers
Regional Settings control intl.cpl
Scanners and Cameras control sticpl.cpl
Sound Properties control mmsys.cpl sounds
System Properties control sysdm.cpl
NOTE: The Scanners and Cameras applet (sticpl.cpl) cannot be run in Windows Millennium. It has been replaced by the Scanners and Cameras Folder, which is similar in function to folders like Printers and Dial-up Networking.

Windows substitutes the name of the tool you want to run for %1%. For example:

How to make Command Prompt, PowerShell, or any Shell launch from the Start Menu directly into Windows Terminal

I love the Windows Terminal, but right now I launch the Terminal, then I pick a Shell (PowerShell, CMD, bash, etc) from the menu. Sometimes I want to be “shell-first.”

I’ll hit the Start Menu, type cmd, and then the older console/terminal starts up. I have to remember to run Terminal THEN run cmd. So I said to myself, “self, what’s a good way to fix that?”

When you press Start and start typing (which is different from WinKey+R and running a .exe directly) you’re looking at Shortcuts/LNK files. You can make your own and change existing ones.

Press Start, type “Command Prompt” or “PowerShell” and then RIGHT CLICK the icon and Open File Location.

For example, Command Prompt was here on my machine:

So I Ctrl+C, Ctrl+V to make a copy (backup) or I can just right click and hit properties to change the one I have.

Then I change the Target to wt.exe (Windows Terminal) and pass in the Named Profile for the Shell I want:

In this case, it’s Command Prompt. I also renamed my LNK file to Command Prompt (Terminal) but that’s optional.

I can do the same thing for PowerShell. I’ve moved to open source PowerShell 7 (based on .NET Core) that I installed from the Windows Store. Some store apps don’t want you to change their icons so I just changed another. You can also make your own with right-click, New Shortcut.

I even did this with the Visual Studio 2019 Developer Prompt by first making a Profile for it in my Terminal settings:

and then changing the icon to call it with wt.exe and the named profile. This can also work with Cygwin, Yori, Ubuntu, or any other shell.

A few minutes and a few shortcut changes later, now I can hit start, type PowerShell, command, cmd, whatever, and it’ll all load in Windows Terminal!

Since this technique works only with lnk files that the Start Menu consumes, it also works with PowerToys Run (which is like Quicksilver or Spotlight on Mac)!

Hope this helps!

Sponsor: The No. 1 reason developers choose Couchbase? You can use your existing SQL++ skills to easily query and access JSON. That’s more power and flexibility with less training. Learn more.

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.

In the Windows Operating system, the RUN cmd Window is used to open any application or document directly whose path is already known. By default, all the RUN commands are stored in System32. By Pressing Windows + R you can open the RUN prompt and type the name of the application to open. It functions more or less like a single-line command-line interface. We can open web pages also using this command-line interface. For example, If you want to launch any webpage using Run, Just type www.example.com in the Run command and hit enter. This will open the webpage in your default web browser. Totally there are 360 windows RUN commands. Get all the RUN commands here . Run command is very useful for IT administrators. There are many ways to launch the run window in Windows 11/10. This article will guide you to open Run command using command prompt.

Table of Contents

Open Run command using Command Prompt:

In Windows 11/10 you can launch the Run command window in several methods. Here you can find list of methods to open Run command.

Launch Run Command using Keyboard Shortcut:

This is the very easiest and quickest method to launch the run command, mostly all users know how to launch run window using the keyboard shortcut .

You can open Run Command by pressing Windows + R, Hold the Windows key on your keyboard, and press the R letter.

Using Windows Search:

Click on the Windows Search icon on the Taskbar and type ‘Run’, Now you’ll get a Run application on the list.

Click and Open the Run.

How to run command prompt commands from a windows shortcut

Using Quick Link Menu:

Press Windows + X to Open the Quick Link menu in Windows 10 or Windows 11.

Now you can see list of Windows Settings and applications, Choose Run to open the Run window.

How to run command prompt commands from a windows shortcut

Using Windows Tools:

Click on Start Menu and choose All apps, scroll down and choose Windows Tools.

How to run command prompt commands from a windows shortcut

How to run command prompt commands from a windows shortcut

Now you’ll get Windows Tools Folder, Choose run command from Windows tools.

How to run command prompt commands from a windows shortcut

Open Run Command using Command Prompt:

Open Command Prompt in normal or elevated mode.

Now type the following shell cmd to open the run cmd.

copy-paste the above-mentioned command and in cmd prompt and hit enter. you’ll get the run command window.

How to run command prompt commands from a windows shortcut

Using PowerShell:

Launch PowerShell and copy-paste the following command and hit enter.

How to run command prompt commands from a windows shortcut

This Powershell cmdlet will open the run cmd window.

Here are following Windows 10 shortcut keys and Run Commands.

Windows 10 keyboard shortcuts

  • Windows + Tab – Launch Windows 10 Task View
  • Windows + Q – Search the web and Windows with Cortana (speech)
  • Windows + S – Search the web and Windows with Cortana (keyboard input)
  • Windows + I Open Windows 10 settings
  • Windows + A Open Windows 10 notifications
  • Windows + L – Lock your Windows 10 device
  • Windows + Ctrl + D – Create new virtual desktop
  • Windows + Ctrl + F4 Close current virtual desktop
  • Windows + Ctrl + [Left][Right] Switch between virtual desktop
  • Windows + H – Share content (if supported by current app)
  • Windows + K Connect to wireless displays and audio devices
  • Windows + X Open Start button context menu
  • Windows key + G Starts App recording
  • Windows + D Show Windows desktop
  • Windows + E Open File Explorer
  • Windows + Space Switch keyboard input language (if you have added at least a second one)
  • Windows + Shift + [Left][Right] Move current Window from one monitor to another (when using a multiple monitor setup)
  • Ctrl + X Cut the selected item.
  • Ctrl + C (or Ctrl + Insert) Copy the selected item.
  • Ctrl + V (or Shift + Insert) Paste the selected item.
  • Ctrl + Z Undo an action.
  • Alt + Tab Switch between open apps.
  • Alt + F4 Close the active item, or exit the active app.
  • Windows logo key + L Lock your PC.
  • Windows logo key + D Display and hide the desktop.
  • F2 Rename the selected item.
  • F3 Search for a file or folder in File Explorer.
  • F4 Display the address bar list in File Explorer.
  • F5 Refresh the active window.
  • F6 Cycle through screen elements in a window or on the desktop.
  • F10 Activate the Menu bar in the active app.
  • Alt + F8 Show your password on the sign-in screen.
  • Alt + Esc Cycle through items in the order in which they were opened.
  • Alt + underlined letter Perform the command for that letter.
  • Alt + Enter Display properties for the selected item.
  • Alt + Spacebar Open the shortcut menu for the active window.
  • Alt + Left arrow Go back.
  • Alt + Right arrow Go forward.
  • Alt + Page Up Move up one screen.
  • Alt + Page Down Move down one screen.
  • Ctrl + F4 Close the active document (in apps that are full-screen and let you have multiple documents open at the same time).
  • Ctrl + A Select all items in a document or window.
  • Ctrl + D (or Delete) Delete the selected item and move it to the Recycle Bin.
  • Ctrl + R (or F5) Refresh the active window.
  • Ctrl + Y Redo an action.
  • Ctrl + Right arrow Move the cursor to the beginning of the next word.
  • Ctrl + Left arrow Move the cursor to the beginning of the previous word.
  • Ctrl + Down arrow Move the cursor to the beginning of the next paragraph.
  • Ctrl + Up arrow Move the cursor to the beginning of the previous paragraph.
  • Ctrl + Alt + Tab Use the arrow keys to switch between all open apps.
  • Alt + Shift + arrow keys When a group or tile is in focus on the Start menu, move it in the direction specified.
  • Ctrl + Shift + arrow keys When a tile is in focus on the Start menu, move it into another tile to create a folder.
  • Ctrl + arrow keys Resize the Start menu when it’s open.
  • Ctrl + arrow key (to move to an item) + Spacebar Select multiple individual items in a window or on the desktop.
  • Ctrl + Shift with an arrow key Select a block of text.
  • Ctrl + Esc Open Start.
  • Ctrl + Shift + Esc Open Task Manager.
  • Ctrl + Shift Switch the keyboard layout when multiple keyboard layouts are available.
  • Ctrl + Spacebar Turn the Chinese input method editor (IME) on or off.
  • Shift + F10 Display the shortcut menu for the selected item.
  • Shift with any arrow key Select more than one item in a window or on the desktop, or select text in a document.
  • Shift + Delete Delete the selected item without moving it to the Recycle Bin first.
  • Right arrow Open the next menu to the right, or open a submenu.
  • Left arrow Open the next menu to the left, or close a submenu.
  • Esc Stop or leave the current task.
  • PrtScn Take a screenshot of your whole screen and copy it to the clipboard.

Run Commands

Use the following shortcut run commands to access Windows items, File Explorer, folders quickly.

Just Press Windows key + R and type (as in bold):

In Windows operating system, Command Prompt is one of the most common features which is normally used to execute the entered commands. But recently, I was surprised to learn that one of my co-workers, who I consider to be a computer expert, didn’t know how to run the command prompt as an administrator.

It turns out that there are several ways to open the elevated Command Prompt on your Windows device. In this article, we will show you five different methods to run Command Prompt as administrator using features like Windows search box, Start menu, Run dialog. So let’s see how to do it.

Open Command Prompt as administrator in Windows 10

Here’s how to open Command Prompt as administrator in Windows 10:

  • Using the Windows search box
  • By using the Start menu
  • Using the Run dialog box
  • Via Task Manager
  • When creating a shortcut on the desktop

1]Using the Windows Search Box

To open an elevated command prompt using the Windows search box, follow the instructions below:

  • Go to the taskbar and click the search box to open Windows Search. Alternatively, you can also use shortcut keys like Win + S o Win+Q.
  • In the search box, type cmdto bring up the command prompt in the list of results.
  • Now right click on the Symbol of the system and select Run as administrator.
  • At this point, a UAC prompt will appear and ask you to allow Command Prompt to make changes to your device.
  • Click on the yes to open the elevated command prompt on your computer screen.

2]Using the Start Menu

Here’s how to open an elevated command prompt using the Start menu.

  • Go to the taskbar and click the Start button.
  • In the menu list, scroll down until you get the window system.

Final report: To make it easier, just click on the “#” symbol and then select the W alphabet. Now, in category W, you will get the window system.

  • Once you find Windows System, expand it.
  • Now right click on the Symbol of the system >More >Run as administratorR.
  • After this, User Account Control will appear and ask for your consent.
  • Select the yes button to run the command prompt as administrator.

3]Using the Run Dialog Box

Windows 10 comes with a built-in Run command dialog, which you can use to open your favorite programs directly. Here is a quick guide to opening an elevated command prompt using this method.

  • Right-click the Start button and select the Correr command. Alternatively, you can also use the Win + R shortcut key.
  • In the text area, type cmd and then press Ctrl + Shift + Esc key combination
  • If the UAC prompt appears, select the yes to open the elevated command prompt.

4] Via Task Manager

To open an elevated Command Prompt using Task Manager, follow the guidelines below:

  • press Ctrl + Shift + Esc key combination to open Task Manager directly.
  • If Task Manager is in less details mode, expand it by clicking the button More details.
  • Go to the menu bar and click on the Expedient menu.
  • Now press and hold control key and then select Run new task option.
  • This will open the elevated command prompt directly.

5]When creating a shortcut on the desktop

To create an elevated Command Prompt desktop shortcut, follow the steps below:

  • Right click on a blank field on your desktop screen and select New> Shortcut.
  • In the new popup window, copy and paste the following commands and then press Next.
  • Provide a suitable name you want for this shortcut and then click Finalize to create the shortcut. This will create a new command prompt shortcut on your desktop screen.
  • Right click on this new shortcut and select Properties from the context menu.
  • In the Properties menu, go to the Shortcut tab and click the Advanced button.

How to run command prompt commands from a windows shortcut

  • Then check the box next to Run as administrator and then click OK.

How to run command prompt commands from a windows shortcut

  • Now select Apply> OK button to apply the changes.

To open an elevated command prompt, you just need to double-click the new desktop shortcut.

Related Post: How to Open PowerShell as Administrator in Windows 10