24

I got used to opening Command Line in a folder I have open in Windows Explorer by clicking File → Open command prompt. Recently this menu item has disappeared from my menus and there's only Open Windows Powershell in there, which is not what I am looking for. I think it was Creators Update that removed it.

How can I restore Open command prompt in Windows Explorer's File menu? (Not context menu)

Screenshot of Windows Explorer window with an arrow pointing between "Open new window" and "Open Windows PowerShell", where the missing menu item is supposed to be.

I am not asking for workarounds or alternatives. I know that I can type cmd in the address bar, Shift-right-click folders and add custom context menu items etc. but I'm asking if it's possible to get that specific menu item back. I'm also not asking about the item in folder's context menu, it's independent from this setting.

I'm looking for an answer to the question asked or an official statement that it's not possible.

gronostaj
  • 55,965
  • 20
  • 120
  • 179
  • apply the [.reg file from my answer here](https://superuser.com/a/1202148/174557) and do a rightclick on the folder to open command prompt (as admin). The option you look for is removed in v1703. – magicandre1981 May 05 '17 at 16:09
  • 8
    Note, you can also click on the addressbar, and type cmd then press enter. A command prompt in that location will be opened. Any doscommand can be used there as well, where the current path can be used by a . For example subst j: . will create a drive letter J: and link it to the current folder. – LPChip May 05 '17 at 17:08
  • In Creators Update Microsoft have indeed changed most methods that used to open CMD to open Power Shell. The real question is why would you try to mess with it? What is it that you can do in CMD and not in Power Shell? Most CMD command work just fine in PowerShell – Yisroel Tech May 05 '17 at 18:33
  • 1
    @YisroelTech - They only work if they are also PowerShell commands. I determine that recently when I needed to copy several files into a single file, PowerShell would give me an error and when I ended up using the correct command generated an invalid binary file, compared to the text file copy within a command file generated. – Ramhound May 05 '17 at 19:01
  • @Ramhound you're right that not all commands are working, but most of them do. So if it's not that hard to switch I would recommend to try to, because at some point Micro$oft will remove CMD anyway... – Yisroel Tech May 05 '17 at 19:04
  • @YisroelTech - While they might make PowerShell the default command prompt shell, and will continue to expand PowerShell, I don't forsee them ever removing the legacy command prompt shell for the simple fact the installation environment currently in use doesn't support PowerShell. I don't forsee the legacy command prompt shell be discontinued in the next decade. – Ramhound May 05 '17 at 19:15
  • @YisroelTech I'm using [Clink](https://mridgers.github.io/clink/) and it doesn't work with Powershell. Besides, command line starts in an instant while Powershell needs about a second before I get the prompt. – gronostaj May 05 '17 at 20:34
  • @gronostaj, I'm not really familiar with Click but its project page says that it does work with PS https://github.com/mridgers/clink/blob/master/docs/clink.md#powershell, on the 2nd note you're correct. – Yisroel Tech May 05 '17 at 20:46
  • again, it is not possible. apply the reg from my answer and do a rightclick to access cmd – magicandre1981 May 06 '17 at 16:22
  • 6
    I completely agree with @gronostaj. His question has been answered nowhere because he is asking for the *file menu*; not just for the right-click context menu. I would also really like the *file menu* entry back because it allowed me to put it as extra icons into the "quick access toolbar". – Linus Jun 26 '17 at 15:51
  • @LPChip is there any way to open a command prompt in admin mode using that technique? – dlf Feb 15 '18 at 16:37
  • 2
    @dlf unfortunately no. The cmd process that spawns from typing in any command in the explorer addressbar will not be launched with administrative privileges. The only method you can use that works is by clicking int he addressbar, and instead of starting typing, copy the address. Then hit the win key, type cmd and then press shift-enter to start cmd in administrative mode. now type cd /d and hit ctrl-v to paste the address in. – LPChip Feb 15 '18 at 18:38
  • https://support.microsoft.com/en-us/help/4027690/windows-powershell-is-replacing-command-prompt – uDev Feb 27 '18 at 01:27
  • Unfortunately, modifying such menus are not possible (context menus can be modified, however) because the operating system itself is removing the support for cmd. – Epoxy Mar 21 '18 at 04:56
  • its weird, I could swear one of my computers still had command prompt in the file menu but not anymore. I guess an update switched it. Anyway, nobody has mentioned that when you are in Powershell, simply enter `cmd` and you will be in command prompt within powershell. If you start in elevated powershell you will be in elevated command prompt. – MilkyTech Mar 11 '20 at 15:55
  • @YisroelTech - There are plenty of commands that only work in command prompt. I have a wget script I use all of the time to get construction plans from a GC and it does not work in powershell. just 1 example. – MilkyTech Mar 11 '20 at 16:00
  • @ChrisM it's mentioned in answers by Johannes Maria Frank and Robert Thomas. – gronostaj Mar 11 '20 at 16:02
  • oh yeah, I didn't bother reading the downvoted answers. Not necessary to add the `.exe`. just type `cmd`. I came upon this thread because I too wanted cmd prompt in the file menu. Guess we'll have to settle for the extra tenth of a second it takes for powershell to open! – MilkyTech Mar 11 '20 at 16:12

5 Answers5

5

It's not possible.


Opportunities

I know, the comments told alternatives already and you don't asked for them, but it might be good for others that come across this.

Cmd - address bar trick

Use Alt + D to focus the address bar, type cmd and hit enter. However you will discover it opens cmd without admin rights.

Get used to PowerShell

Microsoft wants to replace Command Prompt with PowerShell as stated here: https://support.microsoft.com/en-us/help/4027690/windows-powershell-is-replacing-command-prompt, so for especially for the future it might be simply useful to get used to PowerShell commands.

leun4m
  • 334
  • 2
  • 16
  • Really - a vote down? Because I simply said what @gronostaj expected? Maybe use another file explorer instead: https://alternativeto.net/software/windows-explorer/ – leun4m Mar 01 '18 at 13:05
  • 1
    I downvoted because your answer doesn't contain anything that I haven't already started in the question or comments, so it doesn't add any value. – gronostaj Mar 02 '18 at 06:28
  • It is apparently possible because my work PC has both menus. Powershell broke one of my most used commands: `dir /b'. Powershell thinks "/b" is a folder reference. – Ishmael Feb 09 '19 at 18:39
2

I built a tool that can do this. I was not able to find a way to have both Powershell and the Command Prompt, but this tool will swap out powershell for the command prompt in the windows 10 explorer folder file menu.

Have a look here: https://shulerent.com/2018/08/26/restore-open-command-window-here-to-windows-10/

Jason Shuler
  • 121
  • 2
0

I know you didn't ask for a workaround, but automating might still help.

You could work around this by adding

cmd.exe 

at the end of your Microsoft.PowerShell_profile.ps1

Then just open Powershell and PowerShell will open your cmd prompt.

The experience will just be the same.

-1
  • Open:
    • Settings > Personalization > Taskbar
  • or:
    • Win-X > Control Panel > Personalization > Taskbar and Navigation
  • or:
    • Right-Click Date areas > Settings, search Taskbar > Taskbar Settings

uncheck / turn off [replace Command Prompt with Windows PowerShell ...]

ZXX
  • 154
  • 5
  • "Replace Command Prompt with Windows PowerShell **in the menu when I right-click the start button or press Windows+X**" - that's not what I'm asking for. – gronostaj Mar 11 '18 at 08:36
-1

If you type: cmd.exe in the powershell window cmd.exe runs and works as expected. If you need administrator privilege then start powershell with administrator privilege.

  • 5
    Welcome to Super User! Please note OP specifically said *"I am not asking for workarounds or alternatives... I'm asking if it's possible to get that specific menu item back"* – bertieb Sep 17 '18 at 22:00
  • Hi Robert. As bertieb noted, this does not answer my question. I have also explained in comments that I dislike PowerShell because it starts slowly and your solution doesn't help with this issue. – gronostaj Sep 18 '18 at 06:54