New
#50
I was able to get the latest reg files to work by making a change to my registry.
I created a new DWORD32 value of 0x1 named: EnableLinkedConnections in key:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System
After I added it - I had to reboot for the change to take affect.
Great find.
https://support.microsoft.com/en-us/...when-uac-is-co
Tutorial now updated to include this.
EDIT: New tutorial:
Enable Mapped Drives to be Available in Elevated Command Prompt
Last edited by Brink; 29 Apr 2020 at 15:21.
Something's not working as expected. I really have two questions for two related threads and I'm not sure which to post this to. I'd like to get the Add_Open_command_window_here.reg working on right-click and Add_Shift+Open_command_window_here_as_administrator.reg working on shift-right-click.
Problem One: Add_Open_command_window_here.reg adds the option to BOTH right-click and shift-right-click context menus. Add_Shift+Open_command_window_here.reg adds the option to the shift-right-click context menu only and removes it from the right-click menu. How can I reverse that? Both of those files otherwise work as expected and the window opens in the folder where I've right-clicked. There are no interim steps (i.e. UAC) involved.
Problem Two: Add_Shift+Open_command_window_here_as_administrator.reg adds the "as admin" option to the shift-right-click menu and not to the right-click menu as desired. The problem occurs when I try to use the option. When I click on "Open command window here as administrator" a command window starts to open then I get a blank desktop and the UAC prompt for Windows Command Processor. If I allow it, I'm returned to a normal screen with the command window open, but I'm at the C:\ folder, NOT the folder I shift-right-clicked in. I can live with the UAC prompt, but not the C:\ starting point.
Hello Yar, and welcome to Ten Forums.
It is by design from Windows to have the right click option available on both right click and Shift+right click.
The Shift+right click option will only be available when you Shift+right click.
Is the account actually using the context menu an administrator account or standard user account?
What is the full path of the folder you trying to open in the elevated command prompt? Is this folder local, or on some network or external location?
I'll use this info to test on my system to see if I get the same results.
Hi Brink. Thanks for the welcome. This is on my personal computer and I am the admin. For testing, I've been right-clicking on my desktop but the problem occurs on any folder. C:\Program Files\Intel, for example, opens as
Shift-right-clicking in the same folder and choosing "Open command window here as administrator", gets me
![]()
@Yar Notsew,
Where is the [MARS] coming from in your command console?
Is this some sort of custom command prompt using theprompt [MARS]
type command made to be used by the context menu? For example, via Environment Variables??
Yep, MARS is the computer name and I included it in the prompt of the Autorun value. I think I figured this out. HKLM\Software\Microsoft\Command Processor has a key of Autorun with a value I set long ago of
prompt [%COMPUTERNAME%]$S$P$G&&cd /d c:\&&cls
Notice the cd /d c:\ near the end which changes the drive and directory to c:\ when the command window opens regardless of where it was started from.
Evidently, that key is used when the "Open command window here as administrator" option is chosen from the context menu. I replaced it with the value
prompt [%COMPUTERNAME%]$S$P$G&&cls
The "Open...administrator" option works correctly now.
There's also an Autorun key under HKCU\Software\Microsoft\Command Processor which appears to override the HKLM Autorun. It did not have the cd /d c:\ value in the Autorun key so the prompt showed the current unchanged local path for the "Open command prompt here" option. I removed this key since the prompt from HKLM's Autorun is correct now.
Then there's the key of HKEY_CURRENT_USER\Console\%SystemRoot%_system32_cmd.exe that doesn't have an Autorun key but does have other keys that effect the way the command window appears (font, colors, etc.) whether opened as an administrator or not. I also have
HKEY_CURRENT_USER\Console\cmd.exe - Shortcut
HKEY_CURRENT_USER\Console\Command Prompt
HKEY_CURRENT_USER\Console\Elevated Command Prompt
Those last three have keys like ColorTable and FaceName that would appear to change the appearance of the command window but changes there do not get reflected in the command window appearance so I suspect they're obsolete carryovers from Windows 7.
Am I correct in thinking that HKEY_CURRENT_USER\Console\%SystemRoot%_system32_cmd.exe effects what I see in ALL command windows, HKEY_LOCAL_MACHINE\Software\Microsoft\Command Processor sets additional parameters for ALL command windows, and that HKEY_CURRENT_USER\Software\Microsoft\Command Processor can override some of those parameters but only for "Open command window here" and NOT for "Open command window here as administrator"?
I think I have this sorted out now. I appreciate your help and patience.
@Yar Notsew,
Great news. I was thinking part of the command you used for the custom command prompt may have been what was causing the issue. I'm glad you got it sorted out.
That sounds correct based on your testing and results.Yar Notsew said: