Overblog Tous les blogs Top blogs Technologie & Science Tous les blogs Technologie & Science
Editer l'article Suivre ce blog Administration + Créer mon blog
MENU

[Customization] How to add cmdline into contextual mouse menu?

Publié le par damcuvelier

I] With only logged user rights

1) with regfile:

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Folder\shell\Command Prompt]
@="cmdline here"

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\Folder\shell\Command Prompt\command]
@="Cmd.exe /k pushd %L"

 

2) with command line:

 

REG ADD "HKLM\SOFTWARE\Classes\Folder\shell\Command Prompt" /VE /D "cmdline here"
REG ADD "HKLM\SOFTWARE\Classes\Folder\shell\Command Prompt\command" /VE /D "Cmd.exe /k pushd %L"

 

 

II] With admin rights:

1) with regfile:

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\Folder\shell\runas]
@="cmdline here (Admin)"

[HKEY_CLASSES_ROOT\Folder\shell\runas\command]
@="cmd.exe /s /k pushd \"%V\""

[HKEY_CLASSES_ROOT\CLSID\{20D04FE0-3AEA-1069-A2D8-08002B30309D}\shell\runas]
@="Open Command Prompt (Admin)"

[HKEY_CLASSES_ROOT\CLSID\{20D04FE0-3AEA-1069-A2D8-08002B30309D}\shell\runas\command]
@="cmd.exe"

 

2) with command line:

REG ADD "HKCR\Folder\shell\runas" /VE /D "cmdline here (Admin)" /F
REG ADD "HKCR\Folder\shell\runas\command" /VE /D "cmd.exe /s /k pushd \"%V\"" /F
REG ADD "HKCR\CLSID\{20D04FE0-3AEA-1069-A2D8-08002B30309D}\shell\runas" /VE /D "Open Command Prompt (Admin)" /F
REG ADD "HKCR\CLSID\{20D04FE0-3AEA-1069-A2D8-08002B30309D}\shell\runas\command" /VE /D "cmd.exe" /F

 

## and to go further, a context menu editor

to download here (from thewindowsclub.com)

 

Enjoy!

Commenter cet article