Advertisement
modz2014

Smart Access Control Enabler

Jun 16th, 2024
132
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.24 KB | None | 0 0
  1. @echo off
  2.  
  3. REM Check if running with administrative privileges
  4. >nul 2>&1 "%SYSTEMROOT%\system32\cacls.exe" "%SYSTEMROOT%\system32\config\system"
  5.  
  6. if '%errorlevel%' NEQ '0' (
  7. echo Administrator privileges are required to run this script.
  8. echo Please run this script as an administrator.
  9. pause
  10. exit /B 1
  11. )
  12.  
  13. echo Running with administrative privileges.
  14.  
  15. echo Choose an option:
  16. echo 1. On
  17. echo 2. Evaluation
  18. echo 3. Off
  19. echo.
  20.  
  21. :choice
  22. set /P "option=Enter your choice: "
  23.  
  24. REM Check user input and set registry value accordingly
  25. if "%option%"=="1" (
  26. set value=1
  27. set option_text=On
  28. ) else if "%option%"=="2" (
  29. set value=2
  30. set option_text=Evaluation
  31. ) else if "%option%"=="3" (
  32. set value=0
  33. set option_text=Off
  34. ) else (
  35. echo Invalid choice. Please enter 1, 2, or 3.
  36. goto choice
  37. )
  38.  
  39. REM Set the registry key value based on user choice
  40. reg add "HKLM\SYSTEM\CurrentControlSet\Control\CI\Policy" /v VerifiedAndReputablePolicyState /t REG_DWORD /d %value% /f
  41.  
  42. echo Registry key value changed to %option_text%.
  43.  
  44. REM Add a note about resetting related value if turning off
  45. echo Note: If you turn on Smart Control Access in the settings, it will reset another related value to 0.
  46. )
  47.  
  48. pause
  49.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement