Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @echo off
- chcp 65001
- cls
- echo.
- :choice
- set /P c=Activer ou Désactiver le bureau sécurisé ? Taper A ou D :
- if /I "%c%" EQU "A" goto :activer
- if /I "%c%" EQU "D" goto :desactiver
- goto :choice
- :activer
- @echo off
- REG ADD "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System" /v "PromptOnSecureDesktop" /t REG_DWORD /d 1 /f
- REG ADD "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System" /v "ConsentPromptBehaviorAdmin" /t REG_DWORD /d 4 /f
- if %errorlevel% neq 0 (goto :echec) else (echo. && echo Basculement au bureau sécurisé ACTIVÉ ! ♥♥♥)
- goto :exit
- :desactiver
- @echo off
- REG ADD "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System" /v "PromptOnSecureDesktop" /t REG_DWORD /d 0 /f
- REG ADD "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System" /v "ConsentPromptBehaviorAdmin" /t REG_DWORD /d 5 /f
- if %errorlevel% neq 0 (goto :echec) else (echo. && echo Basculement au bureau sécurisé DÉSACTIVÉ ! ♥♥♥)
- goto :exit
- :echec
- echo.
- echo On dirait que la commande ne fonctionne pas. Essaye en lançant le fichier en administrateur.
- echo.
- echo (clic droit sur le fichier → "Exécuter en tant qu'administrateur")
- echo.
- goto :exit
- :exit
- pause
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement