[Windows] Accept by default "Send Diagnostic data to Microsoft" consent (#11121)

This commit is contained in:
Alexey-Ayupov
2024-12-09 19:49:19 +01:00
committed by GitHub
parent 3dca722ddb
commit ddfcef3f6a

View File

@@ -41,6 +41,14 @@ if (-not (Test-IsWin25)) {
throw "Failed to copy HKCU\Software\TortoiseSVN to HKLM\DEFAULT\Software\TortoiseSVN"
}
}
# Accept by default "Send Diagnostic data to Microsoft" consent.
if (Test-IsWin25) {
$registryKeyPath = 'HKLM:\DEFAULT\SOFTWARE\Microsoft\Windows\CurrentVersion\Privacy'
New-ItemProperty -Path $registryKeyPath -Name PrivacyConsentPresentationVersion -PropertyType DWORD -Value 3 | Out-Null
New-ItemProperty -Path $registryKeyPath -Name PrivacyConsentSettingsValidMask -PropertyType DWORD -Value 4 | Out-Null
New-ItemProperty -Path $registryKeyPath -Name PrivacyConsentSettingsVersion -PropertyType DWORD -Value 5 | Out-Null
}
Dismount-RegistryHive "HKLM\DEFAULT"
# Remove the "installer" (var.install_user) user profile for Windows 2025 image