码迷,mamicode.com
首页 > Windows程序 > 详细

win7,8,10取得|取消管理员权限

时间:2015-06-08 16:42:48      阅读:221      评论:0      收藏:0      [点我收藏+]

标签:

取得:

Windows Registry Editor Version 5.00
[HKEY_CLASSES_ROOT\*\shell\runas]
@=”管理员取得所有权”
“NoWorkingDirectory”=””
[HKEY_CLASSES_ROOT\*\shell\runas\command]
@=”cmd.exe /c takeown /f \”%1\” && icacls \”%1\” /grant administrators:F”
“IsolatedCommand”=”cmd.exe /c takeown /f \”%1\” && icacls \”%1\” /grant administrators:F”
[HKEY_CLASSES_ROOT\exefile\shell\runas2]
@=”管理员取得所有权”
“NoWorkingDirectory”=””
[HKEY_CLASSES_ROOT\exefile\shell\runas2\command]
@=”cmd.exe /c takeown /f \”%1\” && icacls \”%1\” /grant administrators:F”
“IsolatedCommand”=”cmd.exe /c takeown /f \”%1\” && icacls \”%1\” /grant 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 && icacls \”%1\” /grant administrators:F /t”
“IsolatedCommand”=”cmd.exe /c takeown /f \”%1\” /r /d y && icacls \”%1\” /grant administrators:F /t”

取消:

Windows Registry Editor Version 5.00
[-HKEY_CLASSES_ROOT\*\shell\runas]
[-HKEY_CLASSES_ROOT\Directory\shell\runas]
[-HKEY_CLASSES_ROOT\dllfile\shell]
[-HKEY_CLASSES_ROOT\Drive\shell\runas]
[-HKEY_CLASSES_ROOT\exefile\shell\runas]
[HKEY_CLASSES_ROOT\exefile\shell\runas]
“HasLUAShield”=””
[HKEY_CLASSES_ROOT\exefile\shell\runas\command]
@=”\”%1\” %*”
“IsolatedCommand”=”\”%1\” %*”

win7,8,10取得|取消管理员权限

标签:

原文地址:http://www.cnblogs.com/sprinng/p/4561084.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!