Windows/BackgroundWallpaper
2021 - Win10 - Wallpaper in registry, regedit
Computer\HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\Wallpapers
- remove BackgroundHistoryPathX to get back windows wallpaper as option.
Images in c:\Windows\Web\4K\Wallpaper\Windows\ , c:\Windows\Web\Wallpaper\Windows\img0.jpg
AWS Wallpaper
- 20 sec after loggin in a user's wallpaper gets updated with server information.
Find user with
Get-WMIObject -Query "select * from Win32_UserAccount where Name='<username>'"
Reggedit Using the user key e.g.
Computer\HKEY_USERS\<S-1-5-...62>\Software\Microsoft\Windows\CurrentVersion\Explorer\Wallpapers
This should show the previous and current wall paper e.g.
BackgroundHistoryPath0 C:\Users\<username>\AppData\Local\Ec2Wallpaper_Info.jpg BackgroundHistoryPath1 C:\Windows\web\wallpaper\Windows\img0.jpg
AWS Ec2LaunchSettings
c:\ProgramData\Amazon\EC2-Windows\Launch\Module\Ec2Launch.psm1
- this runs all the scripts under EC2-Windows\Launch\Scripts\*.ps1
Start > run > Ec2LaunchSettings
C:\ProgramData\Amazon\EC2-Windows\Launch\Scripts\InitializeInstance.ps1
Wait-Metadata
New-WallpaperSetup
New-WallpaperSetup.ps1 - in - c:\ProgramData\Amazon\EC2-Windows\Launch\Module\Scripts\
Create startup dirs for default and all users e.g. "C:\Users\Default\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup"
then create "initWallpaperSetupName" as startup script.
#Powershell "Import-Module "C:\ProgramData\Amazon\EC2-Windows\Launch\Module\Ec2Launch.psd1"; Set-Wallpaper" # This run's all the ec2 scripts\*.ps1 modules, including "Set-Wallpaper.ps1"
- "Set-Wallpaper.ps1"
Impost-WallpaperUtil
Logs to "WallpaperSetup.log" -> C:\ProgramData\Amazon\EC2-Windows\Launch\Log\
Set for user
https://stackoverflow.com/questions/43187787/change-wallpaper-powershell
reg add "HKEY_CURRENT_USER\Control Panel\Desktop" /v Wallpaper /t REG_SZ /d h:\Quotefancy-1542-3840x2160.jpg /f Start-Sleep -s 10 rundll32.exe user32.dll, UpdatePerUserSystemParameters, 0, $false
#PowerShell: $user = Get-WMIObject -Query "select * from Win32_UserAccount where Name='<username>'" $path = 'Registry::HKEY_USERS\' + $user.SID + '\Control Panel\Desktop\' Set-ItemProperty -path $path -name Wallpaper -value 'C:\path\to\wallpaper.jpg' rundll32.exe user32.dll UpdatePerUserSystemParameters