Have a Question?
< All Topics
Print

Wallapaper/Background Change Script

Background/Wallpaper Change Script

#Open the folder en Windows Explorer under C:\Users\USERNAME\AppData\Roaming\PolandRoXCentre
########################################################################################
$path = [Environment]::GetFolderPath(‘ApplicationData’) + “\PolandRoXCentre”

If(!(test-path $path))
{
New-Item -ItemType Directory -Force -Path $path
}
########################################################################################


#Download the image from URL to user profile
########################################################################################
$url = “https://polandrox.org/wp-content/uploads/2022/01/PRX_Centre_Splash_Screen.png” #Image URL
$output = $path + “\PRXBackground.png”
Start-BitsTransfer -Source $url -Destination $output

########################################################################################

 

# Update the background of the desktop
########################################################################################
Set-ItemProperty -path ‘HKCU:\Control Panel\Desktop\’ -name wallpaper -value $output

rundll32.exe user32.dll, UpdatePerUserSystemParameters


########################################################################################

Table of Contents