Windows 7 Forums
Welcome to Windows 7 Forums. Our forum is dedicated to helping you find support and solutions for any problems regarding your Windows 7 PC be it Dell, HP, Acer, Asus or a custom build. We also provide an extensive Windows 7 tutorial section that covers a wide range of tips and tricks.


Windows 7: No REG Command in "Open elevated command window here" DOS Box

15 May 2012   #1

Windows 7 Professional x64 SP1
 
 
No REG Command in "Open elevated command window here" DOS Box

I have used the @="cmd.exe /s /k pushd \"%V\"" type of Registry mod to obtain a context menu "Open elevated command window here" menu item, such as in the "Open elevated command window here" thread ( Open elevated command window here ).

However, the admin cmd window, even though it says "Administrator:" in the title bar, will not seem to work with the REG command (e.g., "REG SAVE [...]", etc.). If I even just type "reg /?" on the cmd line, it just jumps to the next (new) cmd line prompt, without any apparent action. (And, DISKPART will work here, even though REG doesn't.)

[The REG command works fine when I open a pinned cmd.exe link with Admin privileges.]

So,

1. Has anyone else noticed this?

2. And, if I'm not the only user in the universe to have this "feature", does anyone know of a workaround?

Thanks.

My System SpecsSystem Spec
.

15 May 2012   #2
Microsoft MVP

64-bit Windows 8.1 Enterprise
 
 

Hello Fred, and welcome to Seven Forums.

Is this the tutorial you used below to add "Open elevated command window here"?
Open Command Window Here as Administrator
The REG /? command works for me using this when I right clicked on C:\Users and Open elevated command window here.
Name:  CMD.jpg
Views: 30
Size:  60.8 KB
Do you have your UAC notification settings set to at least the default or top level? Normally when you use "Open elevated command window here", you will get a UAC prompt to approve before the elevated CMD window opens. If you do not get a UAC prompt, then this may be why you are having this issue.

Hope this helps for now,
Shawn


My System SpecsSystem Spec
15 May 2012   #3

Windows 7 Professional x64 SP1
 
 

Quote   Quote: Originally Posted by Brink View Post
Hello fwcetus, and welcome to Seven Forums.

Is this the tutorial you used below to add "Open elevated command window here"? Open Command Window Here as Administrator
Yes. (And thanks for the welcome.)

Quote   Quote: Originally Posted by Brink View Post
The REG /? command works for me using this when I right clicked on C:\Users and Open elevated command window here.
Still not for me, though.

Quote   Quote: Originally Posted by Brink View Post
Do you have your UAC notification settings set to at least the default or top level? Normally when you use "Open elevated command window here", you will get a UAC prompt to approve before the elevated CMD window opens. If you do not get a UAC prompt, then this may be why you are having this issue.
I do have UAC set at "Default" (the second one down).

I do get a UAC msgbox when invoking the context menu admin CMD box.

I noticed that your CMD box shows "C:\Windows\System32\cmd.exe" in the title bar, while mine shows "C:\Windows\SysWOW64\cmd.exe", yet we are both using x64 Windows 7.

So, I put the path "C:\Windows\System32\cmd.exe" into the reg file and merged it, but (even though the Registry does show my ""C:\Windows\System32\cmd.exe" change in Regedit) my CMD box still comes up with the "C:\Windows\SysWOW64\" CMD box anyway. ("Windows Knows Best.")

So, I then tried copying "C:\Windows\System32\cmd.exe" into "C:\Windows\" and merged ""C:\Windows\cmd.exe" into the Registry, and I did finally get a "C:\Windows\System32\" copy of CMD to run (from "C:\Windows\") from the context menu, but it still won't process the REG command.

It seems as if I can run at least some other elevated commands (I didn't try them all - <g> ), but not REG.

I noticed that "REG" is not listed in a typical list of CMD commands for some reason, even though it functions as one (well, usually).

I guess, this is not really a huge problem - I can still get REG to work from my pinned (Start Menu) admin CMD box, and in batch files, too. However, I'm just trying to figure out Windows' irregularities... (As a retired software engineer, I know that, when it comes to Windows, "it's not all ones and zeroes" - <g> .)
My System SpecsSystem Spec
.


15 May 2012   #4
Microsoft MVP

64-bit Windows 8.1 Enterprise
 
 

Hmm, that is odd.

As a test, use the same tutorial above to remove the context menu item, then add it back. Next, download and merge the listed CMD option in the tutorial below to see if that may help.

Default File Type Associations - Restore
My System SpecsSystem Spec
15 May 2012   #5

Windows 7 Professional x64 SP1
 
 

Quote   Quote: Originally Posted by Brink View Post
Hmm, that is odd.

As a test, use the same tutorial above to remove the context menu item, then add it back. Next, download and merge the listed CMD option in the tutorial below to see if that may help.

Default File Type Associations - Restore
No changes, Brink, either in which CMD box runs (still SysWOW64) or in how REG works (still doesn't). Thanks for trying...
My System SpecsSystem Spec
15 May 2012   #6

Windows 7 32 bit
 
 

It seems like you are getting Registry and Folder redirection to the 32 bit emulation( the SysWow64 )

On some versions of Windows 7 and Vista if you open Explorer from a 32 bit program, you will actually get the 32 bit explorer from the SysWow64 folder. In fact I was using that with a utility to get 32 bit shell extensions to work on 64 bit Windows. But there seems to be no way to tell if the Explorer in SysWow64(which is a link) points to 32 bit or 64 bit Explorer.

Anyway, the short version is, it sounds to me like you are running the .reg file in a 32 bit Explorer window, which would trigger registry and folder redirection. Try opening an Explorer window using the taskbar button. Then look in TaskManager to make sure it's 64 bit. If it is, then run the .reg download. See what happens.

Please make a restore point first so I don't get blamed if what happens, happens to be something weird.
My System SpecsSystem Spec
15 May 2012   #7

Windows 7 Professional x64 SP1
 
 

Update: (and, before having a chance to mull over MilesAhead's post)

I happened to try "Open[ing] Command Window Here as Administrator", with "C:\Windows\System32\" as the directory, and then with "C:\Windows\SysWOW64\" as the directory, and, in both cases, REG works as it should.

However, selecting any other directory (including other ""C:\Windows\" subdirectories) and "Open[ing] Command Window Here as Administrator" results in a CMD box where REG does not work.

Reg.exe is, of course, located in both "C:\Windows\System32\" and "C:\Windows\SysWOW64\", not surprisingly.

Strange...
My System SpecsSystem Spec
15 May 2012   #8

Windows 7 Professional x64 SP1
 
 

Quote   Quote: Originally Posted by MilesAhead View Post
It seems like you are getting Registry and Folder redirection to the 32 bit emulation( the SysWow64 )
[...]
Anyway, the short version is, it sounds to me like you are running the .reg file in a 32 bit Explorer window, which would trigger registry and folder redirection. Try opening an Explorer window using the taskbar button. Then look in TaskManager to make sure it's 64 bit. If it is, then run the .reg download. See what happens
Thanks, MilesAhead, for your thoughts.

Well, every instance of Explorer (explorer.exe) I can invoke (in a variety of ways) seems to be a 64-bit version - that is to say that I never see any "explorer.exe *32" processes, but only "explorer.exe" processes (from "C:Windows"), in TaskMan.

However, I did merge the "Default_REG.reg" settings, and I rebooted (just for the heck of it), but my "Open Command Window Here as Administrator" menu item still pops up a "C:\Windows\SysWOW64\" copy of cmd.exe, that will not run the REG command (except in "C:\Windows\System32\" or in "C:\Windows\SysWOW64\". (?)
My System SpecsSystem Spec
15 May 2012   #9
Microsoft MVP

64-bit Windows 8.1 Enterprise
 
 

It wouldn't be the "explorer.exe" process. It should be a "cmd.exe" process instead of a "cmd.exe *32" one.

Did you merge the Default_CMD.reg instead earlier?

If you like as a test, create a new administrator account to see how it works while logged on to the new account.
My System SpecsSystem Spec
15 May 2012   #10

Windows 7 32 bit
 
 

Quote   Quote: Originally Posted by Brink View Post
It wouldn't be the "explorer.exe" process. It should be a "cmd.exe" process instead of a "cmd.exe *32" one.

Did you merge the Default_CMD.reg instead earlier?

If you like as a test, create a new administrator account to see how it works while logged on to the new account.
It would be Explorer.exe if he ran it by double clicking the .reg file in a 32 bit instance of explorer. Whichever it is, it still sounds like he's getting the 32 bit emulation redirection.

I have my own PromptHere you can download here:
http://www.favessoft.com/hotkeys.html

It has the ahk source code. You can download AHK_L and compile in 64 bit if you want. Anyway, it doesn't rely on the registry since it doesn't do context menu. It uses a hotkey. Select a folder and hit the hotkey.

Uses optional blur window on Windows 7.
My System SpecsSystem Spec
Reply

 No REG Command in "Open elevated command window here" DOS Box




Thread Tools



Similar help and support threads for2: No REG Command in "Open elevated command window here" DOS Box
Thread Forum
Solved Missing "Open With" command with right-click General Discussion
Solved Can't open cmd through "open command window here" General Discussion
Solved Problems about windows 7 "open command window here" shift-right click General Discussion
Adding "Open Command Prompt" Option Customization
"open with" command not working correctly General Discussion
Solved Open elevated command window here General Discussion
How to open Elevated Command Prompt? Performance & Maintenance

Our Sites

Site Links

About Us

Find Us

Windows 7 Forums is an independent web site and has not been authorized, sponsored, or otherwise approved by Microsoft Corporation. "Windows 7" and related materials are trademarks of Microsoft Corp.

Designer Media Ltd

All times are GMT -5. The time now is 09:03 PM.
Twitter Facebook Google+



Windows 7 Forums

Seven Forums Android App Seven Forums IOS App
  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33