Wie führe ich Befehle als Administrator per Rechtsklick im Kontextmenü aus?

Wie führe ich Befehle als Administrator per Rechtsklick im Kontextmenü aus?

Wie führe ich Befehle als Administrator im Kontextmenü mit der rechten Maustaste aus? Dieser Code funktioniert ordnungsgemäß, wird aber als normaler Benutzer ausgeführt :-( Kann mir jemand einen Rat geben, wie ich das Problem beheben kann? Danke.

Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\Directory\Background\shell\Group A]
"SubCommands"=""

[HKEY_CLASSES_ROOT\Directory\Background\shell\Group A\shell]

[HKEY_CLASSES_ROOT\Directory\Background\shell\Group A\shell\Group B]
"SubCommands"=""

[HKEY_CLASSES_ROOT\Directory\Background\shell\Group A\shell\Group B\shell]

[HKEY_CLASSES_ROOT\Directory\Background\shell\Group A\shell\Group B\shell\Group C]
"SubCommands"=""

[HKEY_CLASSES_ROOT\Directory\Background\shell\Group A\shell\Group B\shell\Group C\shell]

[HKEY_CLASSES_ROOT\Directory\Background\shell\Group A\shell\Group B\shell\Group C\shell\Command A]

[HKEY_CLASSES_ROOT\Directory\Background\shell\Group A\shell\Group B\shell\Group C\shell\Command A\command]
@="cmd"

[HKEY_CLASSES_ROOT\Directory\Background\shell\Group A\shell\Group B\shell\Group C\shell\Command B]

[HKEY_CLASSES_ROOT\Directory\Background\shell\Group A\shell\Group B\shell\Group C\shell\Command B\command]
@="cmd"

[HKEY_CLASSES_ROOT\Directory\Background\shell\Group A\shell\Group B\shell\Group D]
"SubCommands"=""

[HKEY_CLASSES_ROOT\Directory\Background\shell\Group A\shell\Group B\shell\Group D\shell]

[HKEY_CLASSES_ROOT\Directory\Background\shell\Group A\shell\Group B\shell\Group D\shell\Command C]

[HKEY_CLASSES_ROOT\Directory\Background\shell\Group A\shell\Group B\shell\Group D\shell\Command C\command]
@="cmd"

[HKEY_CLASSES_ROOT\Directory\Background\shell\Group A\shell\Group B\shell\Group D\shell\Command D]

[HKEY_CLASSES_ROOT\Directory\Background\shell\Group A\shell\Group B\shell\Group D\shell\Command D\command]
@="cmd"

Antwort1

Das funktioniert einwandfrei

[HKEY_CLASSES_ROOT\directory\Background\shell\runas]
@="Test"

[HKEY_CLASSES_ROOT\directory\Background\shell\runas\command]
@="cmd.exe"

Das funktioniert nicht, warum?

[HKEY_CLASSES_ROOT\directory\Background\shell\Demo]

[HKEY_CLASSES_ROOT\directory\Background\shell\Demo\shell]

[HKEY_CLASSES_ROOT\directory\Background\shell\Demo\shell\runas]
@="Test"

[HKEY_CLASSES_ROOT\directory\Background\shell\Demo\shell\runas\command]
@="cmd.exe"

verwandte Informationen