When deploying BGInfo across multiple machines in an enterprise Windows 7 environment, we face a configuration management issue. The tool inherently creates user-specific configuration files containing environment variables that only resolve correctly for the creating user account. This becomes problematic when trying to establish a standardized deployment.
By default, BGInfo stores its configuration in %APPDATA%\BGInfo\
which translates to different paths for each user. When you run BGInfo interactively, it generates a .bgi
file containing references to user-specific paths like:
FontName=Segoe UI
FontSize=10
Background=0
Position=4
ImageFile=%USERPROFILE%\Desktop\background.bmp
We need to implement a system-wide approach that works for all users while maintaining a single configuration source. Here's the complete implementation:
@echo off
:: BGInfo Enterprise Launch Script
:: Deploy to: C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Startup\
set BGI_PATH=C:\Program Files\BGInfo
set CONFIG_FILE=C:\ProgramData\BGInfo\EnterpriseConfig.bgi
if not exist "%CONFIG_FILE%" (
xcopy "%BGI_PATH%\SampleConfig.bgi" "%CONFIG_FILE%" /Y
)
"%BGI_PATH%\bginfo.exe" "%CONFIG_FILE%" /NOLICPROMPT /TIMER:0 /SILENT
1. Central Configuration Storage: Place your master .bgi
file in C:\ProgramData\BGInfo\
2. Environment Variable Neutralization: Edit the config file to remove user-specific paths:
Replace %USERPROFILE%\Desktop\background.bmp
with C:\Corporate\Wallpapers\login_bg.bmp
3. Deployment Methods: Choose one:
- Group Policy Preferences (for Active Directory environments)
- System image inclusion (for bare-metal deployments)
- Configuration management tools (SCCM, Chef, Puppet)
For more dynamic environments, consider this PowerShell deployment script:
# BGInfo Enterprise Deploy.ps1
$BGIInstaller = "\\fileserver\software\BGInfo\BGInfo64.exe"
$ConfigTemplate = "\\fileserver\configs\BGInfo\EnterpriseTemplate.bgi"
$DestConfig = "C:\ProgramData\BGInfo\EnterpriseConfig.bgi"
# Silent installation
Start-Process -FilePath $BGIInstaller -ArgumentList "/VERYSILENT /SUPPRESSMSGBOXES" -Wait
# Deploy configuration
Copy-Item -Path $ConfigTemplate -Destination $DestConfig -Force
# Set startup entry
$StartupPath = "$env:ProgramData\Microsoft\Windows\Start Menu\Programs\Startup\BGInfoLauncher.cmd"
@"
@echo off
"C:\Program Files\BGInfo\bginfo.exe" "C:\ProgramData\BGInfo\EnterpriseConfig.bgi" /NOLICPROMPT /TIMER:0 /SILENT
"@ | Out-File -FilePath $StartupPath -Encoding ASCII
1. Permission Problems: Ensure the SYSTEM account has read access to the configuration file location
2. Path Resolution: Use 8.3 format paths if encountering long path issues (C:\PROGRA~1\BGInfo
)
3. Multiple Monitor Support: Add /MONITOR:ALL
parameter if needed
4. Configuration Refresh: Include /RTF:ON
if displaying dynamic RTF content
For environments where BGInfo's limitations become problematic, consider:
- Creating a custom GPO-based desktop information solution
- Developing a PowerShell alternative that writes system info to a controlled wallpaper
- Using enterprise monitoring tools that include endpoint information display features
When deploying BGInfo across an enterprise Windows 7 environment, the configuration file (.bgi
) typically contains user-specific paths and settings. The main pain point emerges when the configuration file generated under one user profile fails to work for others due to:
- Absolute paths containing username references
- User-specific registry entries in desktop settings
- Permission issues with the configuration file location
The solution involves creating a configuration that uses environment variables instead of absolute paths. Here's the proper directory structure I recommend:
C:\BGInfo\ │── Bginfo.exe │── Config\ │ └── EnterpriseConfig.bgi └── Scripts\ └── LaunchBGInfo.cmd
First, generate a template configuration on a test machine:
- Run
BGInfo.exe
and configure your desired display settings - Save the configuration to
C:\BGInfo\Config\EnterpriseConfig.bgi
- Edit the .bgi file (it's XML) to replace user-specific paths with environment variables:
<?xml version="1.0"?> <background_config> <image> <!-- Change from user-specific to system location --> <filename>%SystemDrive%\BGInfo\background.bmp</filename> <!-- Other configuration elements --> </image> </background_config>
Create LaunchBGInfo.cmd
with this content:
@echo off pushd "%~dp0" :: Set common variables set BGINFO_PATH=C:\BGInfo\Bginfo.exe set CONFIG_FILE=C:\BGInfo\Config\EnterpriseConfig.bgi set LOG_FILE=C:\BGInfo\Scripts\BGInfo.log :: Run BGInfo with logging "%BGINFO_PATH%" "%CONFIG_FILE%" /TIMER:0 /NOLICPROMPT >> "%LOG_FILE%" 2>&1 popd
For enterprise-wide deployment, use Group Policy to:
- Copy the BGInfo files to
C:\BGInfo
on all machines - Create a logon script that runs the batch file
- Set proper permissions on the BGInfo directory:
icacls "C:\BGInfo" /grant "Users:(OI)(CI)RX" icacls "C:\BGInfo\Config" /grant "Users:(OI)(CI)R" icacls "C:\BGInfo\Scripts" /grant "Users:(OI)(CI)R"
After deployment, verify the solution works across different user types:
- Standard users (non-admin)
- Domain administrators
- Local machine administrators
- Service accounts if applicable
Check the log file (C:\BGInfo\Scripts\BGInfo.log
) for any permission errors or configuration issues.
If BGInfo fails to run for some users:
- Verify the file permissions using
icacls "C:\BGInfo"
- Check if the background bitmap is accessible to all users
- Confirm the configuration file doesn't contain hardcoded paths
- Test running the batch script manually from an affected user account