New
#11
Miro,
If it helps, here's an option for adding an Open command window here as administrator context menu.
Open command window here as administrator - Add in Windows 10 | Windows 10 Tutorials
Miro,
If it helps, here's an option for adding an Open command window here as administrator context menu.
Open command window here as administrator - Add in Windows 10 | Windows 10 Tutorials
Helped not, I'm not working with PowerShell.
Miro
Ah, now I understand what you mean. You want this:
Here's how I do this.
1. Download NirCMD, extract to C:\Windows\System32. (Make sure you download the right 'bitness', i.e. x64 or x32.)
2. Right-click on nircmd.exe, choose Properties and make sure the file is unblocked.
3. Save the following as something like runas_regedit_admin.reg:
4. Save the following as something like open_cmd_as _admin_here.reg:Code:Windows Registry Editor Version 5.00 [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Directory\background\shell] [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Directory\background\shell\Run Regedit as Administrator] "Icon"="C:\\Windows\\regedit.exe,0" "MUIVerb"="Run Regedit as Administrator" [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Directory\background\shell\Run Regedit as Administrator\command] @="nircmd.exe elevate regedit.exe"
5. Merge both REG files into the registry.Code:Windows Registry Editor Version 5.00 [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Directory\background\shell] [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Directory\background\shell\Open CMD here as Administrator] "Icon"="C:\\Windows\\System32\\cmd.exe,0" "MUIVerb"="Open CMD here as Administrator" [HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Directory\background\shell\Open CMD here as Administrator\command] @="nircmd elevate cmd.exe /s /k pushd \"%V\"⧹"
(The above has been tested as working in Win 10 Home 1803 Build 17134.48. See this webpage for more examples of using NirCMD. Note: I also tried Nir Sofer's AdvancedRun but the syntax was not so straightforward.)
Hope this helps...
This help was better than best!
NirSoft offers lot of tools which are perfect to use.
Thank you very much!
We can close thread, no matter if was RunAs solved by Windows or other tools.
Miro
Hmmm... well, I have to laugh. After working out how to do what the OP wanted using NirCMD, I found a small, free utility that does exactly the same but with no effort whatsoever.
If anyone wants right-click versatility, have a look at Sordum.org's Easy Context Menu v1.6 (and use its built-in List Editor to amend the properties of list items, e.g. to add or remove 'Run as administrator' option.) If only I'd found this earlier.
Note: It says it's portable but I found it had written to C:\Program Files\Easy Context Menu and in a Files sub-folder I found NirCMD... so I guess that's how ECM adds elevation.
Hope this helps...