- How to run commands from File Explorer in Windows 10
- How to run a command from File Explorer in Windows 10
- What commands can you run from Windows 10’s File Explorer?
- Do you know other useful commands that can be run from File Explorer?
- cannot run CMD script from Vista windows explorer
- 5 Answers 5
- Related
- Hot Network Questions
- Subscribe to RSS
- Hotkey to open cmd with administration rights in current folder from Explorer
- 5 Answers 5
- Way to open a folder from Windows Explorer in cmd.exe under Windows 10 with one shortcut?
- 5 Answers 5
How to run commands from File Explorer in Windows 10
File Explorer is one of the core apps of Windows 10. It is the place you go to when you need to manage your files and folders. However, File Explorer also has some other hidden capabilities. One spectacular feature is the fact that Windows 10 lets you run commands directly from File Explorer using nothing else but its address bar. It is not something you would think possible, but it is real! For instance, you can use File Explorer to run Command Prompt, open the Settings app or the Control Panel, or even launch WordPad. Read on to see how this all works:
How to run a command from File Explorer in Windows 10
First, you need to open File Explorer. A super-fast way to do it is for you to press the Windows + E keys on your keyboard simultaneously. But if you’d like to use another way to launch File Explorer in Windows 10, here are 9 ways to open File Explorer in Windows 10.
The File Explorer from Windows 10
Once you have opened File Explorer, click or tap on its address bar.
The address bar of File Explorer
NOTE: A faster way to get to the File Explorer address bar is to press the Alt + D keys on your keyboard.
Access the address bar of File Explorer with the keyboard shortcut Alt + D
Now type the command you want to execute. For instance, if you want to launch Command Prompt, type cmd.
Type the command you want to run in the address bar of File Explorer
Now, to run the command you typed, press Enter on your keyboard. Alternatively, you can also click or tap on the “Go to” arrow from the right side of File Explorer’s address bar.
Run command (File Explorer)
Windows 10’s File Explorer automatically interprets and executes the command you entered. In our example, the Command Prompt is now launched.
Command Prompt opened from File Explorer
That’s all! Simple, right?
What commands can you run from Windows 10’s File Explorer?
We now know how to run commands from File Explorer’s address bar. But what commands can we run? The list of commands is long, and we would like to point out that you can use this method to launch almost any core app from Windows 10. Furthermore, you can also use it to access many of the settings available in the Settings app or the Control Panel.
Here are a few of the commands you can run from Windows 10’s File Explorer’s address bar:
- \ – a simple backslash opens your main drive, aka the one where Windows 10 is installed (usually C:\)
- documents – opens your Documents folder.
- downloads – opens your Downloads folder.
- favorites – opens the Favorites folder from your Windows 10’s Internet Explorer.
- pictures – opens your Pictures folder.
- videos – opens your Videos folder.
- calc – opens the Calculator app.
- cleanmgr – opens Disk Cleanup.
- compmgmt.msc or compmgmtlauncher – opens the Computer Management console.
- control – launches Control Panel.
- cmd – launches Command Prompt.
- devmgmt.msc – opens Device Manager.
- dxdiag – opens DirectX Diagnostic Tool.
- explorer – launches a new instance of File Explorer.
- iexplore – launches Internet Explorer.
- magnify – opens Magnifier.
- mip – opens Math Input Panel.
- msinfo32 – opens System Information.
- mstscs – opens Remote Desktop Connection.
- narrator – opens Narrator.
- notepad – opens Notepad.
- osk – launches On-Screen Keyboard.
- paint – opens Paint.
- powershell – launches Windows PowerShell.
- regedit – opens Registry Editor.
- sndvol – opens Volume Mixer.
- snippingtool – opens Snipping Tool.
- taskmgr – opens Task Manager.
- winver – opens About Windows.
- wmplayer – launches Windows Media Player.
- write – opens Wordpad.
P.S. For a more extensive set of File Explorer run commands, download this PDF file that we created for you: List of Windows 10 Run commands.
Do you know other useful commands that can be run from File Explorer?
As you have seen in this article, File Explorer has some surprising abilities. Being able to run commands straight from its address bar is a nifty feature, that we are sure every geek appreciates. If you know of other such hidden features or ways to run commands in File Explorer, we would really like you to share them with us. To do so, you can always use the comments section below.
cannot run CMD script from Vista windows explorer
I am running Vista Home Premium. I tried to write a script to do some simple automation. it does not work!
even the most simple script like:
does not get executed and only an empty CMD shell pops open when started from explorer. From the cmd windows there is no problem.
This is really weird and I have never seen this before (but wrote many CMD scripts before)
ftype cmdfile and batfile are unchanged from «%1» %*
virusscan done — no problems
Is there a policy setting that might have changed? Any ideas?
5 Answers 5
Right click on script, click «Run As Administrator»
Are you sure it’s not executing too quickly?
Add a pause after the end and try again.
Lateral thinking, try PowerShell? Especially the ISE (Integrated Scripting Engine) GUI.
You can even start with built-in commands then work your way up to the PowerShell cmdlets. My view this is ‘the way to go’.
Originally, Microsoft intended to incorporate a new command shell in Vista but then decided to make the new shell a stand-alone application. The new application is called Powershell http://technet.microsoft.com/en-us/scriptcenter/dd742419
Thus, the old command interpreter cmd.exe has been continued although in a slightly newer version. (The Vista version is 6.0 whereas the XP version is 5.1.) Several commands are now in the standard list that were formerly available only in Support Tools or the Server 2003 Tools. There are also some new commands and they are indicated with an asterisk in the list below. Note that some commands may require administrator privileges.
Sounds like your environment variables are corrupt ..
Open up a command prompt and type
And see what comes up then .. If the system32 folder isn’t in there; then you might want to put it in there 🙂
Related
Hot Network Questions
Subscribe to RSS
To subscribe to this RSS feed, copy and paste this URL into your RSS reader.
site design / logo © 2021 Stack Exchange Inc; user contributions licensed under cc by-sa. rev 2021.4.16.39093
By clicking “Accept all cookies”, you agree Stack Exchange can store cookies on your device and disclose information in accordance with our Cookie Policy.
Hotkey to open cmd with administration rights in current folder from Explorer
In Explorer sequence Shift+F10 -> open command window here opens cmd in current directory.
Is there any way to do the same via shortcuts to launch cmd with administration rights?
5 Answers 5
Complete shortcuts are listed here Link to the answer
- Right-click Start & choose Command Prompt or Command Prompt (Admin) from the Quick Link menu. You can also use keyboard shortcuts for this route: Windows key + X, followed by C (non-admin) or A (admin).
- Type cmd in the search box, then press Enter to open the highlighted Command Prompt shortcut. To open the session as an administrator, press Alt+Shift+Enter.
- From File Explorer, click in the address bar to select its contents; then type cmd and press Enter. That opens a non-admin Command Prompt session in the current folder.
- In a File Explorer window, hold down Shift as you right-click on a folder or drive. That opens a non-admin Command Prompt session in the selected location.
- To open an administrative Command Prompt window in the current folder, use this hidden Windows 10 feature: Navigate to the folder you want to use, then hold Alt and type F, S, A (that keyboard shortcut is the same as switching to the File tab on the ribbon, then choose Open command prompt as administrator).
- Simply open cmd prompt from start as Run as Administrator,
- Copy the path where you want to execute using location/Address Bar
- Use CD space paste the address and press Enter
It will set to the desired folder path
I added the commands to the Explorer context menu in the registry for the background, folders, and files.
I know that you wanted a keyboard shortcut. I am hoping that you can use and adapt the commands and use the existing Windows shortcut system that allows you to set keyboard shortcuts.
Here is a link to an article that has the commands and a link to a ZIP with a REG file:
Adding to the Windows registry:
For the folder context-menu: (right-clicking on a folder in an explorer window)
powershell -WindowStyle Hidden «start cmd \»/k cd /d %1\» -v runAs»
For the background context-menu: (right-clicking on the background of an explorer window):
powershell -WindowStyle Hidden «start cmd \»/k cd /d %V\» -v runAs»
For the file context-menu: (right-clicking on a file in an Explorer window):
powershell -WindowStyle Hidden «start cmd \»/k cd /d %w\» -v runAs»
Here is a link to an article about the shell variables:
EDIT:
I added keyboard shortcuts using Shift+F10, Shift+Context menu key, or Shift-Right click, and then a given letter for the desired option, which you can modify in the registry. I put all of the files onto GitHub at the link below.
Way to open a folder from Windows Explorer in cmd.exe under Windows 10 with one shortcut?
I’m looking for a shortcut kind of way in Windows 10 to open cmd.exe with a directory/folder from the Windows Explorer, so that I have this specific folder as actual working directory in the command prompt.
I know the trick with holding Shift and Right-Click on the relative folder in Explorer, where you are getting an extra menu option for open it in cmd.exe, as explained here:
But unfortunately that does not work in Windows 10, it only works for Windows 7 and Windows 8. In Windows 10 you only have the option to open it in the PowerShell, but not in the command prompt / cmd.exe.
- How do I open a folder from Windows Explorer in cmd.exe without doing too much typing?
5 Answers 5
It does work for Windows 10. There are already many duplicate questions:
Basically just take ownership of the HKEY_CLASSES_ROOT\Directory\shell\cmd key and rename the DWORD HideBasedOnVelocityId to ShowBasedOnVelocityId . For more details read
Alternatively just use Andrew Richards’ Enhancing the “Open Command Prompt here” Context Menu experience tweak and have the option to run cmd/powershell/bash. both as normal and elevated rights
Just import the below *.reg file (or copy from the MSDN blog above)
Press Alt + D to go to the address bar*, or click in it and make sure everything is selected (it should be by default). Alternatively, user phuclv informs us that Ctrl + L also selects the address bar.
Type cmd and press Enter.
You can do the same to get a PowerShell window, just type powershell instead of cmd .
You may use the free key-remapping product AutoHotkey.
Here is a script that will start the Command Prompt on the current folder in Explorer when F12 is clicked.
After installing AutoHotKey, put the above text in a .ahk file and double-click it to test. You may stop the script by right-click on the green H icon in the traybar and choosing Exit. To have it run on login, place it in the Startup group at
C:\Users\USER-NAME\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup .
For choosing another hotkey than F12 , see AutoHotkey List of Keys.
Adding ‘Open command window here’ Option to the Windows 10 Context Menu of a Folder
Step One: Press Windows key and + R from the keyboard to open the Run command. Type regedit and then hit enter from the keyboard to open the registry.
Step Two: Go to the following path:
Right-click the cmd key. Scroll to Permissions and then click it.
Step Three: Click Advanced.
Step Four: Click the Change link.
Step Five: Type your user account name and click ‘Check Names’ to verify it. Click OK when you are done.
Step Six: Check ‘Replace owner on subcontainers and objects’. Click Apply and then OK.
Step Seven: In ‘Permissions for cmd’ window, select the Administrator account. Check Allow for full control option. Click Apply and then OK.
Step Eight: Inside the cmd key (right window), right click HideBasedOnVelocityId and then click Rename.
Step Nine: Rename the DWORD from HideBasedOnVelocityId to ShowBasedOnVelocityId, then hit Enter from the keyboard.
You are done. When you press shift from the keyboard and then right-click on any folder, you will have the ‘Open command window here’ option on the Windows 10 Context Menu.
Adding ‘Open command window here’ Option to the Context Menu of Background
Here are the few steps you need to take:
Step One: Press Windows key + R simultaneously to open the Run command. Type regedit and hit enter from the keyboard to open the registry.
Step Two: Go to the following path:
Step Three: Right-click the cmd key and then click Permissions.
Step Four: Click Advanced.
Step Five: Click the change link on top of the window in front of owner option.
Step Six: Type your user account name and click ‘Check Names’ to verify it. Click OK when you are done.
Step Seven: Check ‘Replace owner on subcontainers and objects’ option. Click Apply and then OK.
Step Eight: In permissions window, choose the administrator user. Check Allow for Full Control option, click Apply and then OK.
Step Nine: Inside the cmd key (right window), right-click the HideBasedOnVelocityId DWORD and then click Rename.
Step Ten: Change the DWORD name from HideBasedOnVelocityId to ShowBasedOnVelocityId and press Enter from the keyboard.
That’s all. When you press shift and right-click anywhere on your windows background, you will have an option of ‘Open command window here’ as shown in the following screenshot from Windows 10.