Étape 6 — Appliquer les tweaks registre anti-télémétrie
C'est l'étape la plus importante. On va charger les fichiers de registre de l'image montée et appliquer des centaines de modifications pour désactiver la télémétrie, les publicités, Cortana, Copilot, et verrouiller les services espions.
Comment ça marche ?
On utilise la commande reg load pour charger une "ruche" de registre de l'image montée dans notre registre local, sous un nom temporaire (ex: HKLM\OFFLINE_SW). On applique nos modifications, puis on décharge la ruche avec reg unload. Les modifications sont écrites directement dans les fichiers de l'image.
Script : tweak_registry.ps1
Créez le fichier :
notepad C:\tweak_registry.ps1
Collez le contenu suivant :
$mount = "C:\Win11_Custom\mount"
# ============================================================
# RUCHE 1 : SOFTWARE (télémétrie, Cortana, Copilot, pubs...)
# ============================================================
Write-Host "Chargement ruche SOFTWARE..." -ForegroundColor Cyan
reg load "HKLM\OFFLINE_SW" "$mount\Windows\System32\config\SOFTWARE"
# --- Télémétrie ---
reg add "HKLM\OFFLINE_SW\Policies\Microsoft\Windows\DataCollection" /v AllowTelemetry /t REG_DWORD /d 0 /f
reg add "HKLM\OFFLINE_SW\Policies\Microsoft\Windows\DataCollection" /v MaxTelemetryAllowed /t REG_DWORD /d 0 /f
reg add "HKLM\OFFLINE_SW\Policies\Microsoft\Windows\DataCollection" /v DoNotShowFeedbackNotifications /t REG_DWORD /d 1 /f
# --- Cortana ---
reg add "HKLM\OFFLINE_SW\Policies\Microsoft\Windows\Windows Search" /v AllowCortana /t REG_DWORD /d 0 /f
reg add "HKLM\OFFLINE_SW\Policies\Microsoft\Windows\Windows Search" /v AllowSearchToUseLocation /t REG_DWORD /d 0 /f
reg add "HKLM\OFFLINE_SW\Policies\Microsoft\Windows\Windows Search" /v AllowCloudSearch /t REG_DWORD /d 0 /f
reg add "HKLM\OFFLINE_SW\Policies\Microsoft\Windows\Windows Search" /v DisableWebSearch /t REG_DWORD /d 1 /f
# --- Pubs et suggestions ---
reg add "HKLM\OFFLINE_SW\Policies\Microsoft\Windows\CloudContent" /v DisableWindowsConsumerFeatures /t REG_DWORD /d 1 /f
reg add "HKLM\OFFLINE_SW\Policies\Microsoft\Windows\CloudContent" /v DisableSoftLanding /t REG_DWORD /d 1 /f
reg add "HKLM\OFFLINE_SW\Policies\Microsoft\Windows\CloudContent" /v DisableCloudOptimizedContent /t REG_DWORD /d 1 /f
reg add "HKLM\OFFLINE_SW\Policies\Microsoft\Windows\CloudContent" /v DisableTailoredExperiencesWithDiagnosticData /t REG_DWORD /d 1 /f
# --- Copilot / Recall / AI ---
reg add "HKLM\OFFLINE_SW\Policies\Microsoft\Windows\WindowsCopilot" /v TurnOffWindowsCopilot /t REG_DWORD /d 1 /f
reg add "HKLM\OFFLINE_SW\Policies\Microsoft\Windows\WindowsAI" /v DisableAIDataAnalysis /t REG_DWORD /d 1 /f
# --- CEIP (Customer Experience Improvement Program) ---
reg add "HKLM\OFFLINE_SW\Policies\Microsoft\SQMClient\Windows" /v CEIPEnable /t REG_DWORD /d 0 /f
reg add "HKLM\OFFLINE_SW\Policies\Microsoft\AppV\CEIP" /v CEIPEnable /t REG_DWORD /d 0 /f
# --- Error Reporting ---
reg add "HKLM\OFFLINE_SW\Policies\Microsoft\Windows\Windows Error Reporting" /v Disabled /t REG_DWORD /d 1 /f
reg add "HKLM\OFFLINE_SW\Policies\Microsoft\PCHealth\ErrorReporting" /v DoReport /t REG_DWORD /d 0 /f
# --- AdvertisingInfo ---
reg add "HKLM\OFFLINE_SW\Policies\Microsoft\Windows\AdvertisingInfo" /v DisabledByGroupPolicy /t REG_DWORD /d 1 /f
Write-Host "Dechargement ruche SOFTWARE..." -ForegroundColor Cyan
[gc]::Collect(); Start-Sleep 2
reg unload "HKLM\OFFLINE_SW"
# ============================================================
# RUCHE 2 : SYSTEM (services)
# ============================================================
Write-Host "`nChargement ruche SYSTEM..." -ForegroundColor Cyan
reg load "HKLM\OFFLINE_SYS" "$mount\Windows\System32\config\SYSTEM"
# Désactiver les services de télémétrie (Start = 4 = Disabled)
$servicesToDisable = @(
"DiagTrack" # Connected User Experiences and Telemetry
"dmwappushservice" # Device Management WAP Push
"WerSvc" # Windows Error Reporting
"PcaSvc" # Program Compatibility Assistant
"DoSvc" # Delivery Optimization (P2P updates)
"MapsBroker" # Downloaded Maps Manager
"lfsvc" # Geolocation Service
"RetailDemo" # Retail Demo Service
"RemoteRegistry" # Remote Registry
"WMPNetworkSvc" # Windows Media Player Network Sharing
"XblAuthManager" # Xbox Live Auth Manager
"XblGameSave" # Xbox Live Game Save
"XboxNetApiSvc" # Xbox Live Networking Service
"XboxGipSvc" # Xbox Accessory Management
"wisvc" # Windows Insider Service
)
foreach ($service in $servicesToDisable) {
$regPath = "HKLM\OFFLINE_SYS\ControlSet001\Services\$service"
$exists = reg query $regPath 2>$null
if ($exists) {
reg add $regPath /v Start /t REG_DWORD /d 4 /f | Out-Null
Write-Host " Service desactive : $service" -ForegroundColor Yellow
}
}
Write-Host "Dechargement ruche SYSTEM..." -ForegroundColor Cyan
[gc]::Collect(); Start-Sleep 2
reg unload "HKLM\OFFLINE_SYS"
# ============================================================
# RUCHE 3 : NTUSER.DAT (profil utilisateur par défaut)
# ============================================================
Write-Host "`nChargement profil utilisateur par defaut..." -ForegroundColor Cyan
reg load "HKLM\OFFLINE_USER" "$mount\Users\Default\NTUSER.DAT"
# --- Pubs / ContentDeliveryManager ---
$cdm = "HKLM\OFFLINE_USER\Software\Microsoft\Windows\CurrentVersion\ContentDeliveryManager"
reg add $cdm /v ContentDeliveryAllowed /t REG_DWORD /d 0 /f
reg add $cdm /v FeatureManagementEnabled /t REG_DWORD /d 0 /f
reg add $cdm /v OEMPreInstalledAppsEnabled /t REG_DWORD /d 0 /f
reg add $cdm /v PreInstalledAppsEnabled /t REG_DWORD /d 0 /f
reg add $cdm /v PreInstalledAppsEverEnabled /t REG_DWORD /d 0 /f
reg add $cdm /v SilentInstalledAppsEnabled /t REG_DWORD /d 0 /f
reg add $cdm /v SoftLandingEnabled /t REG_DWORD /d 0 /f
reg add $cdm /v SystemPaneSuggestionsEnabled /t REG_DWORD /d 0 /f
reg add $cdm /v RotatingLockScreenEnabled /t REG_DWORD /d 0 /f
reg add $cdm /v RotatingLockScreenOverlayEnabled /t REG_DWORD /d 0 /f
reg add $cdm /v SubscribedContent-310093Enabled /t REG_DWORD /d 0 /f
reg add $cdm /v SubscribedContent-338388Enabled /t REG_DWORD /d 0 /f
reg add $cdm /v SubscribedContent-338389Enabled /t REG_DWORD /d 0 /f
reg add $cdm /v SubscribedContent-338393Enabled /t REG_DWORD /d 0 /f
reg add $cdm /v SubscribedContent-353694Enabled /t REG_DWORD /d 0 /f
reg add $cdm /v SubscribedContent-353696Enabled /t REG_DWORD /d 0 /f
# --- Barre des tâches : virer Teams, Widgets, Copilot ---
$adv = "HKLM\OFFLINE_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced"
reg add $adv /v TaskbarMn /t REG_DWORD /d 0 /f
reg add $adv /v TaskbarDa /t REG_DWORD /d 0 /f
reg add $adv /v ShowCopilotButton /t REG_DWORD /d 0 /f
reg add $adv /v ShowSyncProviderNotifications /t REG_DWORD /d 0 /f
# --- Recherche : pas de Bing ---
reg add "HKLM\OFFLINE_USER\Software\Microsoft\Windows\CurrentVersion\SearchSettings" /v IsDynamicSearchBoxEnabled /t REG_DWORD /d 0 /f
reg add "HKLM\OFFLINE_USER\Software\Policies\Microsoft\Windows\Explorer" /v DisableSearchBoxSuggestions /t REG_DWORD /d 1 /f
# --- Vie privée ---
reg add "HKLM\OFFLINE_USER\Software\Microsoft\Windows\CurrentVersion\Privacy" /v TailoredExperiencesWithDiagnosticDataEnabled /t REG_DWORD /d 0 /f
Write-Host "Dechargement profil utilisateur..." -ForegroundColor Cyan
[gc]::Collect(); Start-Sleep 2
reg unload "HKLM\OFFLINE_USER"
Write-Host "`n=== TWEAKS REGISTRE DE BASE APPLIQUES ===" -ForegroundColor Green
Exécuter le script :
C:\tweak_registry.ps1
Vous devriez voir "L'opération a réussi." pour chaque clé, et la liste des 15 services désactivés.