@color 0A
@title 添加系统右键菜单项 管理员取得所有权(^&W)(带盾牌) by wjshan0808
@echo off
echo * >nul
reg add HKCR*shell
unas /ve /d "管理员取得所有权(&W)" /f
reg add HKCR*shell
unas /v Icon /t reg_expand_sz /d "%SystemRoot%system32user32.dll,6" /f
reg add HKCR*shell
unas /v NoWorkingDirectory /t reg_sz /d "" /f
reg add HKCR*shell
unascommand /ve /d "%ComSpec% /C TAKEOWN /F "%%1" && ICACLS "%%1" /GRANT Administrators:F /Q /T" /f
reg add HKCR*shell
unascommand /v IsolatedCommand /t reg_sz /d "%ComSpec% /C TAKEOWN /F "%%1" && ICACLS "%%1" /GRANT Administrators:F /Q /T" /f
rem Directory
reg add HKCRDirectoryshell
unas /ve /d "管理员取得所有权(&W)" /f
reg add HKCRDirectoryshell
unas /v Icon /t reg_expand_sz /d "%SystemRoot%system32user32.dll,6" /f
reg add HKCRDirectoryshell
unas /v NoWorkingDirectory /t reg_sz /d "" /f
reg add HKCRDirectoryshell
unascommand /ve /d "%ComSpec% /C TAKEOWN /F "%%1" /R /D Y && ICACLS "%%1" /GRANT Administrators:F /Q /T" /f
reg add HKCRDirectoryshell
unascommand /v IsolatedCommand /t reg_sz /d "%ComSpec% /C TAKEOWN /F "%%1" /R /D Y && ICACLS "%%1" /GRANT Administrators:F /Q /T" /f
:: exefile
reg add HKCRexefileshellTakeAuthority /ve /d "管理员取得所有权(&W)" /f
reg add HKCRexefileshellTakeAuthority /v Icon /t reg_expand_sz /d "%SystemRoot%system32user32.dll,6" /f
reg add HKCRexefileshellTakeAuthoritycommand /ve /d "%ComSpec% /C TAKEOWN /F "%%1" && ICACLS "%%1" /GRANT Administrators:F /Q /T" /f
pause
添加系统右键菜单项 管理员取得所有权(W)(带盾牌).bat