diff --git a/packages/installer.vm/tools/chocolateyinstall.ps1 b/packages/installer.vm/tools/chocolateyinstall.ps1 index 4046f535a..3436b17b8 100644 --- a/packages/installer.vm/tools/chocolateyinstall.ps1 +++ b/packages/installer.vm/tools/chocolateyinstall.ps1 @@ -122,13 +122,18 @@ try { Write-Host "`t[-] %LOCALAPPDATA%\Boxstarter\boxstarter.log" -ForegroundColor Yellow } - # Let users know installation is complete by setting background, playing win sound, and display message box + # Let users know installation is complete by setting lock screen & wallpaper background, playing win sound, and display message box # Set background Set-ItemProperty 'HKCU:\Control Panel\Colors' -Name Background -Value "0 0 0" -Force | Out-Null $backgroundImage = "${Env:VM_COMMON_DIR}\background.png" if ((Test-Path $backgroundImage)) { + # Set lock screen image + New-Item "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\PersonalizationCSP" -Force | Out-Null + New-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\PersonalizationCSP" -Name LockScreenImagePath -PropertyType String -Value "C:\ProgramData\_VM\background.png" -Force | Out-Null + New-ItemProperty -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\PersonalizationCSP" -Name LockScreenImageStatus -PropertyType DWord -Value 1 -Force | Out-Null + # Set desktop wallpaper image # Center: 0, Stretch: 2, Fit:6, Fill: 10, Span: 22 - New-ItemProperty -Path "HKCU:\Control Panel\Desktop" -Name WallpaperStyle -PropertyType String -Value 0 -Force | Out-Null + New-ItemProperty -Path "HKCU:\Control Panel\Desktop" -Name WallpaperStyle -PropertyType String -Value 6 -Force | Out-Null New-ItemProperty -Path "HKCU:\Control Panel\Desktop" -Name TileWallpaper -PropertyType String -Value 0 -Force | Out-Null Add-Type -TypeDefinition @" using System;