Bienvenido! - Willkommen! - Welcome!

Bitácora Técnica de Tux&Cía., Santa Cruz de la Sierra, BO
Bitácora Central: Tux&Cía.
Bitácora de Información Avanzada: Tux&Cía.-Información
May the source be with you!

Thursday, September 8, 2011

Add elevated command prompt to context menu

Source 
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???
sevenforums.com/tutorials/47415-open-command-window-here-administrator
1. To Add "Open Command Window Here as Administrator"
A) Click on the download button below to download the file below.
Add_Open_Command_Window_Here_as_Administrator.reg
download
B) Go to step 3.
2. To Remove "Open Command Window Here as Administrator"
A) Click on the download button below to download the file below.
Remove_Open_Command_Window_Here_as_Administrator.reg
download
3. Click on Save, and save the .reg file to the desktop.
4. Right click on the downloaded .reg file and click on Merge.
5. When prompted, click on Run, Yes, Yes, and OK to approve merging the .reg file.
6. You can now delete the downloaded .reg file if you like.
 

No comments: