


If %check% =Q call \\adcpserver01\BGInfo\\BGInfo64.exe \\adcpserver01\BGInfo\qa.bgi /timer:0 /silent /accepteula If %check% =D call \\adcpserver01\BGInfo\\BGInfo64.exe \\adcpserver01\BGInfo\dev.bgi /timer:0 /silent /accepteula If %check% =P call \\adcpserver01\BGInfo\\BGInfo64.exe \\adcpserver01\BGInfo\prod.bgi /timer:0 /silent /accepteula The path is shared to the location of the BGInfo application and supporting files. Rem these check to see if the variable check are one of the identified servers, if so, it will initiate the appropriate identifying profile. Rem this action is initiated if srv doesn’t = DC, so this is a non compliant server name If batch file exists, run batch file to update background info for current user, then exit. Rem if srv doesn’t =DC, then check to see if a batch file already exists. If exist “C:\ProgramData\Microsoft\Windows\Start Menu\Programs\StartUp\*.bgi” (ĭel “C:\ProgramData\Microsoft\Windows\Start Menu\Programs\StartUp\*.bgi” /q Rem this is to remove any previous BGInfo setting placed by previous users Rem makes srv variable = 2nd and 3rd characters in computername Rem makes check variable = to the 4th character in computername

Rem turns off activity in command prompt echo off We use a product called BCM to place the shortcut, but there are other methods to automate this as well. I have three different sets of batch files that do different things, so I’ll show all three and explain what is happening in each one.įirst one is the main batch file that is initiated by creating a shortcut to it and placing it in the common startup folder of every server. Then, I have a certain number of servers that were built prior to the naming standard and don’t comply, so I had to add some special name checking to work these into my automation. (P)roduction, (D)evelopment, (Q)uality Assurance, (T)est, (S)tage The fourth letter in the server name identifies the type of server… The majority of our servers follow a naming convention that have the first three letters identify which data center they reside in. So, here is the environment in which I work in so you can get a little bit of understanding as to the challenge I was presented with in implementing BGInfo across all of my Windows servers.

I love to script, so I created a few simple batch command files that help automate the process of utilizing BGInfo for the servers I support. If you are not familiar with BGInfo, do a quick search and see how it can help identify and provide valuable information to system administrators while working on desktops and servers.
