|
本帖最后由 wenbieba 于 2023-10-8 10:54 编辑
@Echo Offsetlocal EnableDelayedExpansion
cd /d "%~dp0" &&SET P=%~dp0
cd %systemroot%\system32
call :IsAdmin
reg delete "HKCR\*\shell\NSudo" /fReg.exe add "HKCR\*\shell\NSudo" /v "SubCommands" /t REG_SZ /d "NSudo.RunAs.TrustedInstaller;NSudo.RunAs.TrustedInstaller.EnableAllPrivileges;NSudo.RunAs.System;NSudo.RunAs.System.EnableAllPrivileges;" /f
Reg.exe add "HKCR\*\shell\NSudo" /v "MUIVerb" /t REG_SZ /d "以超级管理员权限运行" /fReg.exe add "HKCR\*\shell\NSudo" /v "Icon" /t REG_SZ /d "\"%P%NSudo.exe\"" /f
Reg.exe add "HKCR\*\shell\NSudo" /v "Position" /t REG_SZ /d "1" /f
Exit
:IsAdmin
Reg.exe query "HKU\S-1-5-19\Environment"If Not %ERRORLEVEL% EQU 0 ( Cls & Echo You must have administrator rights to continue ... Pause & Exit
)Cls
goto:eof
这个命令子菜单不出现,麻烦大神修改一下
|
|