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
fwcetus

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
Brink
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: 31
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
fwcetus

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
Brink
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
fwcetus

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
MilesAhead

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
fwcetus

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
fwcetus

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
Brink
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
MilesAhead

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 W7.
My System SpecsSystem Spec
Reply

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




Thread Tools





Similar help and support threads
Thread Forum
Missing "Open With" command with right-click
Hi Folks: If I right-click a single file, the "open with" command is missing in Windows 7 Home Premium.:( How do I fix this missing command? Thanks, MS:D
General Discussion
Can't open cmd through "open command window here"
I have searched and do everything on fixing the registry, but still I can't open the CMD by right click in a folder and choose "open command window here." The windows says: "THis file does not have a program associated with it for performing this action. Please install or if one is installed...
General Discussion
Problems about windows 7 "open command window here" shift-right click
When I clicked on "open command window here" on shift-right click menu. It shows me an error message as the attachment. Before it works fine until last month. Does Windows last update update caused that problem or I did something wrong?
General Discussion
Adding "Open Command Prompt" Option
Hey guys, I know there's a way to add a "Open command window here" when you click ON a folder... but what I'm curious about is if there's a way to do that if you're IN a folder. It never made sense to me, if I want to run a command-line utility like ffmpeg on a file, to have to go up a folder,...
Customization
"open with" command not working correctly
Hi, I've been using XP for 6 years and just switched to Windows 7 3 days ago when I got a new computer. The default image viewing is Windows Photo Viewer, which is fine. I am running Fireworks MX (yes, I know it's old, but I can't afford to buy a newer version), and sometimes I'd like to...
General Discussion
Open elevated command window here
I could prolly figure it out but does anyone know offhand how to add an "Open elevated command window here" option in addition to the "Open command window here" shift+context menu for a folder?
General Discussion

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 15:39.

Twitter Facebook Google+



Windows 7 Forums

Seven Forums Android App Seven Forums IOS App