Windows 7 Forums Search
Welcome to Windows 7 Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows 7. The Windows 7 forum also covers news and updates and has an extensive Windows 7 tutorial section that covers a wide range of tips and tricks.


Windows 7 - Add elevated command prompt to context menu

 
06-27-2011   #1


Windows 7 Professional x64 SP1
 
 

Add elevated command prompt to context menu

@ 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 System SpecsSystem Spec
06-27-2011   #2


Windows 7 Professional x64 SP1
 
 


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 System SpecsSystem Spec
06-27-2011   #3


Windows 7 Ultimate x64 SP1
 
 


Hello Montecarlo,

You might also see if this may work you as well. It will add Open Command Window Here as Administrator to the file, folder, and Desktop context menu.

Open Command Window Here as Administrator

Hope this helps,
Shawn
My System SpecsSystem Spec
.


06-28-2011   #4


Windows 7 Professional x64 SP1
 
 


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 System SpecsSystem Spec
06-28-2011   #5


Windows 7 Professional x64 SP1
 
 


@ 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!!! 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!!! 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 System SpecsSystem Spec
06-28-2011   #6


Windows 7 Ultimate x64 SP1
 
 


You're most welcome Montecarlo. I'm glad that we could help.
My System SpecsSystem Spec
Reply

 Add elevated command prompt to context menu problems?



Thread Tools



Similar Threads for: Add elevated command prompt to context menu
Thread Forum
Elevated Command Prompt Shortcut Tutorials
Tip for Elevated Command Prompt General Discussion
Elevated Command Prompt Tutorials
How to open Elevated Command Prompt? Performance & Maintenance
elevated command prompt fails General Discussion


All times are GMT -5. The time now is 06:38 AM.



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
  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30