Hi All,
There is a bug in BGinfo that some of you may have noticed which causes the applied wallpaper to be tiled even though bginfo is set to “stretch” mode. This occurs on windows 8/10 where you have the following setting set to more than 100% :
No matter what i tried to do i could not get BGInfo to behave. I noted that this issue is a problem on machines with a higher horizontal resolution than “1680”. I put together the below powershell script to check this resolution, and if greater than 1680 , bypass bginfo and set a normal (corporate) wallpaper without BGinfo applied, otherwise BGinfo will run as normal.
This file runs as a user logon startup script.
Note: The only issue with this script is the user will have to log off/on to see the changes for the first time. I tried to use an old unsupported method (from WindowsXP) of ” rundll32.exe user32.dll, UpdatePerUserSystemParameters ” but this doesnt work, if anyone has any suggestions on what replaces this command let me know in comments.
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 | |
} | |
We determined that BGInfo needed the 'HighDPIaware' compatibility option enabled.
We set a user GPP to write a reg key:
“HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers”
Value Name: “{Path}\BGInfo.exe”
Value type: REG_SZ
Value data:”~ HIGHDPIAWARE”
LikeLike
This comment has been removed by the author.
LikeLike
This (Reg key fix) worked for me very well, thank you.
LikeLiked by 1 person