Workaround for BGInfo Tiled wallpaper on high resolution screens

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% :

 

This problem would happen even if i had a wallpaper with dimensions the same as the screen resolution. This makes no difference because of the above slider setting:
Example of what it looks like when tiled (not my image)

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.

Here it is:


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
}

view raw

bypass bginfo

hosted with ❤ by GitHub

3 thoughts on “Workaround for BGInfo Tiled wallpaper on high resolution screens

  1. 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”

    Like

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s