Skip to content

Commit

Permalink
[Windows] Accept by default "Send Diagnostic data to Microsoft" conse…
Browse files Browse the repository at this point in the history
…nt (#11121)
  • Loading branch information
Alexey-Ayupov authored Dec 9, 2024
1 parent 3dca722 commit ddfcef3
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions images/windows/scripts/build/Configure-User.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit ddfcef3

Please sign in to comment.