Solved Add elevated command prompt to context menu

montecarlo1987

New member
Member
VIP
Local time
4:39 PM
Messages
145
@ AceInfinity & anyone who wishes to respond:

Hello. Nice to meet you. I have a question to ask you or anyone that would like to help me...

After seeing your example above, it got me thinking... ...I would like to add to my context menu an elevated command prompt (with administrator privileges) in the same or similar coding fashion (not binary code) as in this example below. The key is that it has to be "elevated" with Administrator privileges, not just a normal command prompt to open. I am not sure how to write a working script since it "MAY" (probably is) quite different than the coding pattern in my example here after including the 'elevated' coding component part to it:

[HKEY_CLASSES_ROOT\Directory\Background\shell\Elevated Command Prompt]

[HKEY_CLASSES_ROOT\Directory\Background\shell\Elevated Command Prompt\command]
@="control appwiz.cpl"

Please correct by adding and or deleting or modifying the script above so the code that would demonstrate a working "elevated" command prompt script to open in a window.

I would also like to add the command prompt icon to my context menu too. I am very sure that it would look something like this (pretty sure if the registry key information is correct though, probably it is not since I am looking for the script to be 'elevated' as I have already stated):

[HKEY_CLASSES_ROOT\Directory\Background\shell\Elevated Command Prompt]
"Icon"="C:\\Windows\\Context Menu Icons\\Elevated Command Prompt.ico"

Where an "Elevated Command Prompt" ico icon in a "Context Menu Icons" folder would be FIRST placed in the C:\Windows folder location BEFORE running a workable elevated command prompt registry script.

So what is the proper coding I need to do (and appropriately placed in this script) in order to add an elevated command prompt with the icon to this script so it works in the context menu???

Please... ...if you would write one for me from the example above, I will get the idea on what I need to do. It cannot be too long of a script to modify in some way.

Please reply.

Thank you!

NOTE: Script written for Windows 7.
 

My Computer

Computer type
PC/Desktop
OS
Windows 7 Pro x64 SP1 & Windows 8 & 8.1 Pro x64
Hello. I tested with the test registry script and yes... ...I have the name "Elevated Command Prompt" in my context menu with the representative icon, and CMD does open successfully... ...the only issue is that it is NOT "elevated", but a "regular" command prompt. That is the question... ...what do I need to modify (subtract or add) to the code in order to the "elevated" command prompt (administrator privileges)??? Please provide the script to accommodate these changes.

Please reply.

Thank you!
 

My Computer

Computer type
PC/Desktop
OS
Windows 7 Pro x64 SP1 & Windows 8 & 8.1 Pro x64

My Computer

Computer type
PC/Desktop
Computer Manufacturer/Model Number
Self built custom
OS
64-bit Windows 11 Pro for Workstations
CPU
Intel i7-8700K OC'd to 5 GHz
Motherboard
ASUS ROG Maximus XI Formula Z390
Memory
64 GB (4x16GB) G.SKILL TridentZ RGB DDR4 3600 MHz
Graphics Card(s)
ASUS ROG-STRIX-GTX1080TI-O11G-GAMING
Sound Card
Integrated
Monitor(s) Displays
2 x Samsung Odyssey G7 27"
Screen Resolution
2560x1440
Hard Drives
1TB Samsung 990 PRO M.2,
4TB Samsung 990 PRO PRO M.2,
TerraMaster F8 SSD Plus NAS
PSU
Seasonic Prime Titanium 850W
Case
Thermaltake Core P3
Cooling
Corsair Hydro H115i
Keyboard
Logitech wireless K800
Mouse
Logitech MX Master 4
Internet Speed
2 Gb/s Download and 100 Mb/s Upload
Antivirus
Malwarebyte Anti-Malware Premium
Browser
Google Chrome
Other Info
Logitech Z625 speaker system,
Logitech BRIO 4K Pro webcam,
HP Color LaserJet Pro MFP M477fdn,
APC SMART-UPS RT 1000 XL - SURT1000XLI,
Galaxy S23 Plus phone
Hello again. May I be a pain in your rear and ask you how the entire script would be assembled? I absolutely apologise for nagging you! I tried adding it and a few diferent ways as well to the script you have above and I still get the "regular" command prompt. Could you please add the entire corrected script as a reg file in your reply to make matter easy!

Please reply!

THANK YOU EVER SO MUCH!!!
 

My Computer

Computer type
PC/Desktop
OS
Windows 7 Pro x64 SP1 & Windows 8 & 8.1 Pro x64
@ Brink
Brink, your link to the instructional thread (http://www.sevenforums.com/tutorials/47415-open-command-window-here-administrator.html) works like a top!!! I love it!!! :D It gives me not only features
to the drive or folder, but also the desktop -- what exactly I am looking for!!!
I would of never figured out that code... ...I am kind of new to script coding and I would of definitely needed help there!

AGAIN, THANK YOU SO MUCH!!!!! YOUR A BLESSING!!!!


I personally thank you for your instructions, the added additional points you have posted (THEY ARE USEFUL!) and sticking by me as I was pestering you!!! :D Your definitely a friend of mine to help me and others here as well!!! You are an asset to this forum as well!!!

Again, thank you!!!
 

My Computer

Computer type
PC/Desktop
OS
Windows 7 Pro x64 SP1 & Windows 8 & 8.1 Pro x64
You're most welcome Montecarlo. I'm glad that we could help. :)
 

My Computer

Computer type
PC/Desktop
Computer Manufacturer/Model Number
Self built custom
OS
64-bit Windows 11 Pro for Workstations
CPU
Intel i7-8700K OC'd to 5 GHz
Motherboard
ASUS ROG Maximus XI Formula Z390
Memory
64 GB (4x16GB) G.SKILL TridentZ RGB DDR4 3600 MHz
Graphics Card(s)
ASUS ROG-STRIX-GTX1080TI-O11G-GAMING
Sound Card
Integrated
Monitor(s) Displays
2 x Samsung Odyssey G7 27"
Screen Resolution
2560x1440
Hard Drives
1TB Samsung 990 PRO M.2,
4TB Samsung 990 PRO PRO M.2,
TerraMaster F8 SSD Plus NAS
PSU
Seasonic Prime Titanium 850W
Case
Thermaltake Core P3
Cooling
Corsair Hydro H115i
Keyboard
Logitech wireless K800
Mouse
Logitech MX Master 4
Internet Speed
2 Gb/s Download and 100 Mb/s Upload
Antivirus
Malwarebyte Anti-Malware Premium
Browser
Google Chrome
Other Info
Logitech Z625 speaker system,
Logitech BRIO 4K Pro webcam,
HP Color LaserJet Pro MFP M477fdn,
APC SMART-UPS RT 1000 XL - SURT1000XLI,
Galaxy S23 Plus phone
Back
Top