I'm not sure why you and SIW had a issue with this Open Command Window Here as Administrator and the Take Ownership context menu items working with both added to the context menu separately. I have not had any issues with them.
Last edited by Brink; 11 Jun 2010 at 02:55 PM..
Reason: updated
System Manufacturer/Model Number Si setup OS windows 7 Premium CPU AMD phenom quad 9550 Motherboard asus M3A78 Pro Memory 4gb 1066 Graphics Card HD 6850 1GB Sound Card Realtek Monitor(s) Displays acer 19" flat Screen Resolution 1440x900
Keyboard Microsoft 600 Mouse Laser Logitech MX 518 PSU 500w Cooling 3 fans Hard Drives 1 x sataII 1TB samsung F3
Corsair Force GT (55 GB) Internet Speed 30mb / 3mb
I'm not sure why you and SIW had a issue with this Open Command Window Here as Administrator and the Take Ownership context menu items working with both added to the context menu separately. I have not had any issues with them.
Update.
I have updated the Open Command Window Here as Administrator and the Take Ownership downloads so that installing one will completely remove the other one so it will not cause issues. I have not found a way to have both in the context menu at the same time yet since they both use the runas key and cannot use it at the same time.
[HKEY_CLASSES_ROOT\Directory\shell\Command as Admin]
[HKEY_CLASSES_ROOT\Directory\shell\Command as Admin\command]
@="cmd.exe /s /k pushd \"%V\""
Not inside run as,it works fine.
I just took over a folder and got up a command window as admin while it was doing it.
Definitely works for me now,thanx Brink.
System Manufacturer/Model Number Si setup OS windows 7 Premium CPU AMD phenom quad 9550 Motherboard asus M3A78 Pro Memory 4gb 1066 Graphics Card HD 6850 1GB Sound Card Realtek Monitor(s) Displays acer 19" flat Screen Resolution 1440x900
Keyboard Microsoft 600 Mouse Laser Logitech MX 518 PSU 500w Cooling 3 fans Hard Drives 1 x sataII 1TB samsung F3
Corsair Force GT (55 GB) Internet Speed 30mb / 3mb
If you type diskpart (requires elevated command prompt to use) and press enter in the command prompt that you open using the above, UAC will prompt you to then elevate the command prompt. The "C:\Windows\system32.cmd.exe" in the tiltle bar is misleading since a title bar does not indicate whether it's elevated or not.
As a possible solution to having both an Elevated Prompt and the Take Ownership menu option in the context menu, what I have found that you can do is first install the Take Ownership registry file. For the Elevated Command Prompt, the process is a little bit more involved.
The first step is to copy the cmd.exe file from C:\Windows\System32 directory to C:\Windows. The next and key step is to change the properties of the cmd.exe file that you just copied in to the C:\Windows directory. What you want to do is to change the Compatibility settings for the cmd.exe file and check the box for "Run this program as an administrator". The next few steps are just to manually edit the registry settings to add the Elevated Command Prompt context menu choice.
In HKCR>Directory>shell, create the key ElevatedPrompt. For the Default REG_SZ setting, change the value to "Open Elevated Command Prompt Here". Next, create a new string value called Icon and assign is the value "C:\Windows\cmd.exe". Now, create a sub key from ElevatedPrompt called "command". Inside this sub key, assign the default value of cmd.exe /s /k pushd "%V".
Repeat the above steps in HKCR>Drive>shell.
Now, you should have both Take Ownership and Elevated Command Prompt active in the context menu.
This is a great addon for Windows 7. However it leaves you in the slightly odd situation where getting to a command prompt with admin privs is easier than just opening a (non-admin) shell with "Open Command Window Here".
Opening a normal command shell needs you to hold down the shift key to get the extended right-click menu, whereas this adds an admin shell to the normal (non-shift) right click menu.
So, any chance of a tweak to either-
Add the "Command Window As Administrator" option to the SHIFTED context menu.
Add the normal non-admin command shell to the default context menu as we as the one with admin privs.