The more elegant way to go about this is to save your BGInfo template and deploy it using Group Policy Preferences. This way, you can be sure that every machine on the domain gets the policy and files that it needs.
Some solutions I’ve seen talk about placing the BGInfo executable, template and EULA into the SYSVOL share and setting a logon script to call these executables directly from there. This works – but I prefer to copy the files to each individual machine and setting a shortcut to run in the All Users\Startup directory. The benefits to this are:
- Provided that the machine has had a Group Policy Update (and we’re ensuring that the machine is fully ‘gpupdated’ before we give it to our users, right?) BGInfo will still run if the network and SYSVOL share are unavailable, such as a cached login. This can be valuable when you’ve got a user that is working remotely.
- Though in small networks, the small load that is placed on your domain controllers may be acceptable – I prefer not to leave this to chance, and stop machines unnecessarily hammering the DC’s on logon to run an executable.
So, what do we do?
The breakdown of steps are as follows:
- Download BGInfo from the Micosoft Technet site. Extract the executable and run it, accepting the EULA.
- Configure the BGI template file using the place mark holders. I usually put the Company Name as static text at the top, and follow the format that is used. As a minimum, I’d including the following fields:
- User Name
- Host Name
- IP Address
- MAC Address
- Default Gateway
- Boot Time
- Logon Domain
- Logon Server
- While you’re in theBGI file, configure any layout options you’ll need. Again, I usually go with the following:
- Background: Copy the user’s wallpaper settings
- Position: Top Right
- Desktop: Set all to Update this wallpaper
- Save your BGI template file to a Deployment location containing utilities. I usually keep these on a dedicated server under a share Deployment with a subpath Utilities\BGInfo. For the purposes of this lab, I’ll use \\davelab.local\netlogon\Deployment\Utilities\BGInfo
- Save the BGInfo.exe and EULA.txt to the Deployment location.
- On my networks, I usually setup a directory structure to store Utilities, which then acts as a storage space for any SOE items that I will eventually deploy. My preference is to store these in C:\Program Files\Company Name\Utilities\BGInfo, so for the purposes of this lab, I’ll use C:\Program Files\Dave Lab Enterprises\Utilities\BGInfo.
- Create this path on a reference server, and copy your executable and BGI template file to this directory. This will enable you to create a shortcut file which you’ll deploy later.
- In the Deployment location, create a .lnk shortcut file to the BGInfo.exe that you moved to your Utilities store.
- The .lnk shortcut should point to the Utilities directory, and use the following command line options /timer:0 /nolicprompt. For this lab, it will look like this:
- “C:\Program Files\Dave Lab Enterprises\Utilities\BGInfo\Bginfo.exe” “C:\Program Files\Dave Lab Enterprises\Utilities\BGInfo\DaveLabEnterprises.bgi” /timer:0 /nolicprompt
- Ensure that the Start In field points to the Utilities directory.
- What you should see now, is that your Deployment directory contains the following:
- Great a GPO and use Group Policy Preferences under Computer Configuration to create operations to copy the files to the following locations:
- BGI, EXE, EULA- > Copy to the Utilities directory. (C:\Program Files\Dave Lab Enterprises\Utilities\BGInfo)
- Shortcut -> All Users Startup directory (C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Startup\bginfo.lnk)
- Link the GPO to the OU containing your workstations, and servers. This can be linked higher up the domain tree, but I generally recommend against linking to the top of the domain. Good AD Design and Best Practices dictates that you’ll have an OU and multiple sub OU’s for your organisation, which leaves the top level of the tree alone.
- Run gpupdate your test workstation (or wait 90 minutes) and verify that the files have copied to the destination that you set in the GPO Prefences.
- Log off and log back on again, and verify that your desktop background has updated with the useful information!