Files
policies/Políticas/Mantenimiento.cmd

69 lines
3.5 KiB
Batchfile

@echo off
setlocal
echo ==========================================
echo Aplicando configuración institucional...
echo ==========================================
:: ============================
:: CARGAR HIVE NTUSER.DAT COMO default_profile
:: ============================
echo 🔄 Montando hive NTUSER.DAT...
reg load "HKU\default_profile" "C:\Users\Default\NTUSER.DAT"
if %errorlevel% neq 0 (
echo ❌ Error cargando NTUSER.DAT. ¿Ya está montado o no tienes permisos?
goto :EOF
)
:: =========================================================
:: TECLADO
:: =========================================================
reg add "HKU\default_profile\Control Panel\Keyboard" /v InitialKeyboardIndicators /t REG_DWORD /d 2 /f
reg add "HKCU\Control Panel\Keyboard" /v InitialKeyboardIndicators /t REG_DWORD /d 2 /f
:: =========================================================
:: SEGURIDAD Y CONTROL DE USUARIO
:: =========================================================
reg add "HKLM\SOFTWARE\Policies\Microsoft\Edge" /v PasswordManagerEnabled /t REG_DWORD /d 0 /f
reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer" /v NoDriveTypeAutoRun /t REG_DWORD /d 255 /f
reg add "HKU\default_profile\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer" /v NoDrives /t REG_DWORD /d 4 /f
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer" /v NoDrives /t REG_DWORD /d 4 /f
reg add "HKU\default_profile\Software\Oculus VR, LLC\Oculus\Libraries" /f
reg add "HKU\default_profile\Software\Microsoft\Windows\CurrentVersion\Policies\System" /v DisableRegistryTools /t REG_DWORD /d 1 /f
reg add "HKU\default_profile\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer" /v NoControlPanel /t REG_DWORD /d 1 /f
reg add "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer" /v NoControlPanel /t REG_DWORD /d 1 /f
:: =========================================================
:: RENDIMIENTO Y MANTENIMIENTO
:: =========================================================
reg add "HKLM\Software\Policies\Microsoft\Windows\CloudContent" /v DisableSoftLanding /t REG_DWORD /d 1 /f
reg add "HKLM\Software\Policies\Microsoft\Windows\DataCollection" /v AllowTelemetry /t REG_DWORD /d 0 /f
reg add "HKU\default_profile\Software\Policies\Microsoft\Windows\Explorer" /v NoStartMenuSuggestions /t REG_DWORD /d 1 /f
reg add "HKCU\Software\Policies\Microsoft\Windows\Explorer" /v NoStartMenuSuggestions /t REG_DWORD /d 1 /f
reg add "HKLM\Software\Policies\Microsoft\Windows\WindowsUpdate\AU" /v NoAutoRebootWithLoggedOnUsers /t REG_DWORD /d 1 /f
:: =========================================================
:: MANTENER EQUIPOS LIMPIOS Y REINICIADOS
:: =========================================================
reg add "HKLM\Software\Microsoft\Windows\CurrentVersion\Explorer\VolumeCaches\Temporary Files" /v StateFlags0001 /t REG_DWORD /d 2 /f
reg add "HKLM\SOFTWARE\Policies\Microsoft\Windows\System" /v DeleteUserProfilesOlderThan /t REG_DWORD /d 30 /f
reg add "HKU\default_profile\Control Panel\Desktop" /v ScreenSaveTimeOut /t REG_SZ /d 600 /f
reg add "HKU\default_profile\Control Panel\Desktop" /v ScreenSaverIsSecure /t REG_SZ /d 1 /f
reg add "HKCU\Control Panel\Desktop" /v ScreenSaveTimeOut /t REG_SZ /d 600 /f
reg add "HKCU\Control Panel\Desktop" /v ScreenSaverIsSecure /t REG_SZ /d 1 /f
:: ============================
:: DESMONTAR HIVE
:: ============================
echo 🔄 Desmontando hive...
reg unload "HKU\default_profile"
echo ✅ Configuración aplicada a default user y usuario actual.
pause