Simple BGInfo AD logon script

This is my simple logon script for the popular BGInfo utility that uses a few batch scripts along with Group Policy to run at each user login.

bginfo

What this script does:

  1. Checks to see if bginfo.exe exist on the local machine, if not copy it from the network share to c:\bginfo\
  2. Copy bg.jpg and default.bgi from network share to c:\bginfo\
  3. Copy BGInfo_Refresh.bat to the Start menu for easy manual refreshes
  4. Runs BGInfo and applies the default template from local copies

How to install:

  1. Download BGInfo and copy it to a network share, I will be using the logon folder located under SYSVOL on my DC.
  2. Create a BGInfo template file (default.bgi) and save it along with any needed images (bg.jpg) on the network share
  3. Create the logon.bat and BGInfo_Refresh.bat files, copy/paste the text from below and save
  4. Add the logon script to your GPO

logon.bat:

@echo off
CLS

ECHO Detecting BGInfo.exe...
IF NOT EXIST "c:\bginfo\bginfo.exe" (
ECHO Copying BGInfo.exe...
::EDIT SOURCE PATH BELOW TO MATCH YOUR ENVIRONMENT
XCOPY "\\site.domain.net\sysvol\...\Logon\bginfo.exe" "c:\bginfo\" /y /q /h
) ELSE (
ECHO c:\bginfo\bginfo.exe exists! Skipping copy...
)

ECHO Copying BGInfo config locally...
::EDIT SOURCE PATHS BELOW TO MATCH YOUR ENVIRONMENT
XCOPY "\\site.domain.net\sysvol\...\Logon\bg.jpg" "c:\bginfo\"  /y /q /h
XCOPY "\\site.domain.net\sysvol\...\Logon\default.bgi" "c:\bginfo\" /y /q /h

ECHO Copying BGInfo_Refresh.bat to Start menu...
::EDIT SOURCE PATH BELOW TO MATCH YOUR ENVIRONMENT
XCOPY "\\site.domain.net\sysvol\...\Logon\BGInfo_Refresh.bat" "%HOMEDRIVE%%HOMEPATH%\Start Menu\" /y /q /h

ECHO Applying BGInfo...
"C:\bginfo\bginfo.exe" "C:\bginfo\default.bgi" /TIMER:00 /NOLICPROMPT

ECHO Done!

BGInfo_Refresh.bat

@echo off
CLS
ECHO Re-Applying BG INFO...
"C:\bginfo\bginfo.exe" "C:\bginfo\default.bgi" /TIMER:00 /NOLICPROMPT
ECHO Done!