29th March 2024

BGInfo Distribution with Domain Group Policy

We will explain in detail the distribution of BGInfo with Group Policy in Active Directory environment. Before starting how to distribute, it would be useful to briefly explain what BGInfo is.

BgInfo

`BGInfo` is free software developed by Mark Russinovich that allows basic information in the windows operating system to be viewed as background. It provides a lot of information such as computer name, IP address, domain name, free space on the disk as a background.

The advantages of using this tool are for system users, sometimes when you make multiple connections at the same time, you can forget where you are and which server or connection you are on, without looking at the IP address or computer name of the network card.

Another advantage is for the staff of the helpdesk, not every user has to know their IP address or computer name, but they may not be competent enough to provide this information if help is requested. Thanks to this application, there will be no need for remote routing.

You can get the application from the link below.

https://docs.microsoft.com/tr-tr/sysinternals/downloads/bginfo

BgInfo v4.28
BgInfo v4.28

 

We will download the application and extract it from the zip file.

BGInfo-Extract All
BGInfo-Extract All

 

The application is displayed as follows with the extraction.

BGınfo file
BGınfo file

 

When Bginfo.exe is run, a window like the one below will open. This is the view of the default configuration of the application.

Bginfo.exe
Bginfo.exe

 

We can make a configuration that includes only the desired sections. After configuring, we can save it to BGinfo folder with the name Config.bgi by selecting “Save As” from the File menu.

LEARN MORE  Windows Command Line Operations for Domain Penetration Tests
Config.bgi
Config.bgi

 

Our configuration file, which we have made as we want, can be seen in the BGInfo folder below.

Config.bgi-BGInfo
Config.bgi-BGInfo

 

In order for the application and the configuration file to be applied with group policy, a file named Bginfo.vbs is created and we edit and save the content as follows.

Set WshShell = WScript.CreateObject(“WScript.Shell”)

WshShell.Run(“\\systemconf.local\NETLOGON\BGinfo\Bginfo.exe \\systemconf.local\NETLOGON\BGinfo\config.bgi /timer:0 /accepteula /silent”)
Bginfo.vbs
Bginfo.vbs

 

We need to add the BGInfo folder to the `”\\systemconf.local\NETLOGON“` share folder on the domain machine. Thus, the final version of the current folder contents will be as follows.

NETLOGON\BGInfo
NETLOGON\BGInfo

 

All files are ready. Now we will start the distribution process with the application’s group policy. We are creating a new group policy for the distribution process. For this

Right-click on “Group Policy Management -> Group Policy Objects” and select “New”.

Group Policy Objects
Group Policy Objects

 

The new group policy is named. We have given it as BGInfo in the example. Let’s exit by clicking the “OK” button.

New GPO-BGInfo
New GPO-BGInfo

 

To edit the created policy, right-click on the policy and select “Edit”.

BGInfo-Policy-Edit
BGInfo-Policy-Edit

 

We make the following arrangements within the group policy to be applied. Select “User Configuration -> Policies -> Windows Settings -> Scripts (Logon / Logoff)”. Double click the Logon on the right.

Scripts (Logon / Logoff)
Scripts (Logon / Logoff)

 

When the user logs on to the computers, we select the “Add” button in the “Logon Properties” window that opens to run the script prepared.

Logon Properties
Logon Properties

 

We click on the “Browse” button in the “Add a Script” window.

Add a Script
Add a Script

 

In this window, we select the script on the network path where the script is located. We add it by clicking the “Open” button.

LEARN MORE  Moving Operations Master(FSMO) Roles and Global Catalog Servers Placement
Select Bginfo.vbs script
Select Bginfo.vbs script

 

It is seen that we have selected the script in this window.  In the “Logon Properties” section, the process is completed. We finish the process by clicking the “OK” button.

Select Bginfo.vbs script
Select Bginfo.vbs script

 

The prepared policy must be connected to the OU where it will be applied. For this, right-click the OU to which the police will be connected and select “Link an Existing GPO…“.

Link an Existing GPO…
Link an Existing GPO…

 

The policy named BGInfo is selected and the policy is connected to the OU by clicking the OK button.

BGInfo-Select GPO
BGInfo-Select GPO

 

The final image on the desktop of the users to whom the policy has been applied should be as follows. Thus, the desired machine information is written on the desktop wallpaper via the BGInfo application.

BGInfo ready
BGInfo ready

 

6 thoughts on “BGInfo Distribution with Domain Group Policy

  1. I am getting an invalid character error when running the scri[pt… Here is what I have as BGInfo.vbs:
    Set WshShell = WScript.CreateObject(“WScript.Shell”)
    WshShell.Run(“\\aurora.bosspn.com\NETLOGON\BGinfo\Bginfo.exe \\aurora.bosspn.com\NETLOGON\BGinfo\config.bgi /timer:0 /accepteula /silent”)

    I get Line: 1, Char: 37, Error: Invalid character, Code: 800A0408.

    Any ideas? Thx – mm

    1. Hello GammBot

      Could you try using the extension as domainname.local.

      I just wrote the domain as an example.

      Or can you change the ” sign in the script.

Leave a Reply to saas Cancel reply

Your email address will not be published. Required fields are marked *