批处理选择语句if命令语法不对
打开后选择之后闪退命令如下,已删去部分echo命令随便问一句,如何获得注册表项的权限setvariable=set/pvariable=请输入:if/i"%variabl...
打开后选择之后闪退
命令如下,已删去部分echo命令
随便问一句,如何获得注册表项的权限
set variable=
set /p variable=请输入:
if /i "%variable%"=="1" ( goto taskmgr )
if /i "%variable%"=="2" ( goto task )
if /i "%variable%"=="3" ( goto logoff )
if /i "%variable%"=="4" ( goto setfolder )
if /i "%variable%"=="5" ( exit )
if not defined variable ( msg %username% 您输入的有误,请重新输入 )
:task
@echo off
reg add "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer" /v "NoRun" /d 0 /t REG_DWORD /f
:taskmgr
@echo off
reg add "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\System" /v "DisableTaskMgr" /d 0 /t REG_DWORD /f
:logoff
@echo off
reg add "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer" /v "StartMenuLogOff" /d 0 /t REG_DWORD /f
@echo off
reg add "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\System" /v "NoDispSettingsPage" /d 0 /t REG_DWORD /f 展开
命令如下,已删去部分echo命令
随便问一句,如何获得注册表项的权限
set variable=
set /p variable=请输入:
if /i "%variable%"=="1" ( goto taskmgr )
if /i "%variable%"=="2" ( goto task )
if /i "%variable%"=="3" ( goto logoff )
if /i "%variable%"=="4" ( goto setfolder )
if /i "%variable%"=="5" ( exit )
if not defined variable ( msg %username% 您输入的有误,请重新输入 )
:task
@echo off
reg add "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer" /v "NoRun" /d 0 /t REG_DWORD /f
:taskmgr
@echo off
reg add "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\System" /v "DisableTaskMgr" /d 0 /t REG_DWORD /f
:logoff
@echo off
reg add "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer" /v "StartMenuLogOff" /d 0 /t REG_DWORD /f
@echo off
reg add "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\System" /v "NoDispSettingsPage" /d 0 /t REG_DWORD /f 展开
2个回答
展开全部
goto :start
set variable=
set /p variable=请输入:
if /i "%variable%"=="1" goto taskmgr
if /i "%variable%"=="2" goto task
if /i "%variable%"=="3" goto logoff
if /i "%variable%"=="4" goto setfolder
if /i "%variable%"=="5" exit
if not defined variable echo %username% 您输入的有误,请重新输入
echo 请按任意键返回到开始选择界面
puase>nul
cls
goto :start
:task
@echo off
reg add "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer" /v NoRun /d 0 /t REG_DWORD /f
pause
goto :eof
:taskmgr
@echo off
reg add "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\System" /v DisableTaskMgr /d 0 /t REG_DWORD /f
pause
goto :eof
:logoff
@echo off
reg add "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer" /v StartMenuLogOff /d 0 /t REG_DWORD /f
pause
goto :eof
@echo off
reg add "HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\System" /v NoDispSettingsPage /d 0 /t REG_DWORD /f
pause
goto :eof
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询