Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @echo off
- REM Check if running with administrative privileges
- >nul 2>&1 "%SYSTEMROOT%\system32\cacls.exe" "%SYSTEMROOT%\system32\config\system"
- if '%errorlevel%' NEQ '0' (
- echo Administrator privileges are required to run this script.
- echo Please run this script as an administrator.
- pause
- exit /B 1
- )
- echo Running with administrative privileges.
- echo Choose an option:
- echo 1. On
- echo 2. Evaluation
- echo 3. Off
- echo.
- :choice
- set /P "option=Enter your choice: "
- REM Check user input and set registry value accordingly
- if "%option%"=="1" (
- set value=1
- set option_text=On
- ) else if "%option%"=="2" (
- set value=2
- set option_text=Evaluation
- ) else if "%option%"=="3" (
- set value=0
- set option_text=Off
- ) else (
- echo Invalid choice. Please enter 1, 2, or 3.
- goto choice
- )
- REM Set the registry key value based on user choice
- reg add "HKLM\SYSTEM\CurrentControlSet\Control\CI\Policy" /v VerifiedAndReputablePolicyState /t REG_DWORD /d %value% /f
- echo Registry key value changed to %option_text%.
- REM Add a note about resetting related value if turning off
- echo Note: If you turn on Smart Control Access in the settings, it will reset another related value to 0.
- )
- pause
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement