Skip to content

Instantly share code, notes, and snippets.

@hyang0
Created June 1, 2015 09:19
Show Gist options
  • Save hyang0/1eeb1affd91e91ba73c7 to your computer and use it in GitHub Desktop.
Save hyang0/1eeb1affd91e91ba73c7 to your computer and use it in GitHub Desktop.

Revisions

  1. hyang0 created this gist Jun 1, 2015.
    19 changes: 19 additions & 0 deletions grant_administrator_access_winxp.reg
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,19 @@
    Windows Registry Editor Version 5.00
    [HKEY_CLASSES_ROOT\*\shell\runas]
    @="获取管理员权限"
    "NoWorkingDirectory"=""
    [HKEY_CLASSES_ROOT\*\shell\runas\command]
    @="cmd.exe /c takeown /f \"%1\" & cacls \"%1\" /t /e /c /g administrators:F"
    "IsolatedCommand"="cmd.exe /c takeown /f \"%1\" & cacls \"%1\" /t /e /c /g administrators:F"
    [HKEY_CLASSES_ROOT\exefile\shell\runas2]
    @="获取管理员权限"
    "NoWorkingDirectory"=""
    [HKEY_CLASSES_ROOT\exefile\shell\runas2\command]
    @="cmd.exe /c takeown /f \"%1\" & cacls \"%1\" /t /e /c /g administrators:F"
    "IsolatedCommand"="cmd.exe /c takeown /f \"%1\" & cacls \"%1\" /t /e /c /g administrators:F"
    [HKEY_CLASSES_ROOT\Directory\shell\runas]
    @="获取管理员权限"
    "NoWorkingDirectory"=""
    [HKEY_CLASSES_ROOT\Directory\shell\runas\command]
    @="cmd.exe /c takeown /f \"%1\" /r /d y & cacls \"%1\" /t /e /c /g administrators:F"
    "IsolatedCommand"="cmd.exe /c takeown /f \"%1\" /r /d y & cacls \"%1\" /t /e /c /g administrators:F"