-
-
Save danjpadgett/908cc1b83696ee403ce9 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Set-ExecutionPolicy Bypass -Force | |
Function Set-WallPaper | |
{ | |
if ((Test-Path "C:\Windows\Media\Wallpaper.jpg") -eq $false) | |
{ | |
Copy-Item -Path ("\\server\Themes\BrandingOfficial\Desktop Wallpaper 2560x1440px 1 - v1.0.jpg") -Destination C:\windows\media\Wallpaper.jpg -Force | |
Write-Host "Wallpaper Copied" | |
} | |
{} | |
Set-ItemProperty -path 'HKCU:\Control Panel\Desktop\' -name Wallpaper -value "C:\Windows\Media\Wallpaper.jpg" | |
Set-ItemProperty -path 'HKCU:\Control Panel\Desktop\' -name TileWallpaper -value "0" | |
Set-ItemProperty -path 'HKCU:\Control Panel\Desktop\' -name WallpaperStyle -value "2" | |
} | |
$bginfo = Set-Location \\server\dfs\apps\bginfo\ | |
$res = Get-WmiObject -Class Win32_VideoController | Select-Object CurrentHorizontalResolution | |
if ($res.CurrentHorizontalResolution -le '1680') | |
{ | |
Write-Host "bginfo will apply" | |
$args = @('/TIMER:00', '/SILENT', '/NOLICPROMPT') | |
& "$bginfo.\bginfo.exe" "$bginfo.\Bginfo.bgi" $args | |
} | |
else | |
{ | |
Write-Host "Processed Local wallpaper" | |
Set-WallPaper | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment