To browse this website, you should unconditionally agree to its terms and conditions. If not, please stop and leave now. And, why is this site black? Reading black text on a white background is like staring at a lit bulb at close quarters. This website uses soft light to display the text and turns off the background.

Site Logo

V. Subhash's BgInfo VBScript Add-Ons

Mark Russinovich's BgInfo is a Microsoft utility that can be set up to display computer configuration details, such as hardware information, on the Windows desktop background (wallpaper). In this page, I am offering you some unofficial add-ons that make BgInfo more useful - particularly in offices where employees are asked to provide their system configuration details to system administrators.

Windows desktop background (wallpaper) updated by BgInfo with computer configuration information

My BgInfo Addons

Actual details displayed by my BgInfo configuration file

BgInfo comes with a set of built-in computer information fields that can be displayed on your desktop background wallpaper. It also allows you to create custom or user-defined fields. The built-in ones are good but your custom fields can be great.

In this page, I am offering some VBScript source code that you can use to create custom fields for BgInfo. You are free to extend this source code as you please.

I suggest you first copy the source code and paste them in text files with extension VBS. (You can use the names I have used too.) Next, launch BgInfo and click on the Custom button. In the User-Defined Fields window, click on the New button. In the Define New Field window, enter a name for the custom field. (For example, you can enter "Get_Computer_Model" if the VBScript file is Get_Computer_Model.) Then, click on the Browse button and select a VBS file. Similarly, create fields for other VBS files. Then click OK and return to the main window of BgInfo. From the main window, you can select one of the new fields you have created and click the Add button. The field will now appear on the preview of your desktop. Now, you may want to make some changes. Change

Get_Computer_Model:
<Get_Computer_Model>

to:

Computer
<Get_Computer_Model>

Similarly add other built-in and custom fields. Now, change color and font of the fields to your liking. You may also need to position it suit your wallpaper. (Now may be a good time to give you Erik Anderson's MP3 Pirate wallpaper link.)

After you are completely satisfied with how your wallpaper looks, save your settings to a "BgInfo Configuration" file. Create an application shortcut that silently updates your wallpaper with this configuration file:

"C:\Program Files\BgInfo\BgInfo.exe" "C:\Program Files\BgInfo\my_bginfo.bgi" /timer:0

Place this shortcut in your menu startup folder to ensure that it is launched with Windows Startup. Finally, here are the VBScript files.

  1. Get_Computer_Model.vbs:
    
    winmgt = "winmgmts:{impersonationLevel=impersonate}!//"
    
    Set oWMI_Qeury_Result = GetObject(winmgt).InstancesOf("Win32_ComputerSystem")
    
    
    For Each oItem In oWMI_Qeury_Result
     Set oComputer = oItem
    Next
    
    
    If IsNull(oComputer.Model) Then
      sComputerModel = "*no-name* model"
    Else
      If LCase(oComputer.Model) = "system product name" Then
        sComputerModel =  "Custom-built PC"
      Else
        sComputerModel =  oComputer.Model
      End If
    End If
    
    If IsNull(oComputer.Manufacturer) Then
      sComputerManufacturer = "*no-name* manufacturer"
    Else
      If LCase(oComputer.Manufacturer) = "system manufacturer" Then
        sComputerManufacturer =  "some assembler"
      Else
        sComputerManufacturer =  oComputer.Manufacturer
      End If
    End If
    
    
    sComputer = Trim(sComputerModel) & " by " & Trim(sComputerManufacturer)
    
    Echo sComputer
  2. Get_Motherboard_Model.vbs:
    
    winmgt = "winmgmts:{impersonationLevel=impersonate}!//"
    
    Set oWMI_Qeury_Result = GetObject(winmgt).InstancesOf("Win32_BaseBoard")
    
    
    For Each oItem In oWMI_Qeury_Result
     Set oMotherBoard = oItem
    Next
    
    If (IsEmpty(oMotherBoard) or IsNull(oMotherBoard)) Then
      sMotherBoard = "*no-name* model"
    Else
      If IsNull(oMotherBoard.Model) Then
        If IsNull(oMotherBoard.Product) Then
          sMotherBoardModel = "*no-name* model"
        Else
          sMotherBoardModel =  oMotherBoard.Product
        End If
      Else
        sMotherBoardModel =  oMotherBoard.Model
      End If
    
      If IsNull(oMotherBoard.Manufacturer) Then
        sMotherBoardManufacturer = "*no-name* manufacturer"
      Else
        sMotherBoardManufacturer =  oMotherBoard.Manufacturer
      End If
    
      sMotherBoard = sMotherBoardModel & " by " & sMotherBoardManufacturer
    End If
    
    Wscript.Echo sMotherBoard
  3. Get_Memory.vbs:
    
    winmgt = "winmgmts:{impersonationLevel=impersonate}!//"
    
    
    Set oWMI_Qeury_Result = GetObject(winmgt).InstancesOf("Win32_PhysicalMemory")
    
    iTotalMemory = 0
    
    For Each oItem In oWMI_Qeury_Result
      iTotalMemory = iTotalMemory + oItem.Capacity
    Next
    
    iTotalMemory = Round(iTotalMemory/(1024*1024))
    
    Echo "Installed: " & iTotalMemory & " MB"
    
    
    
    Set oWMI_Qeury_Result = GetObject(winmgt).InstancesOf("Win32_ComputerSystem")
    
    For Each oItem in oWMI_Qeury_Result
     iAvailableMemory  = oItem.TotalPhysicalMemory
    Next
    
    iAvailableMemory = Round(iAvailableMemory/(1024*1024))
    
    Echo "Available: " & iAvailableMemory & " MB"
    
    
    
    Set oWMI_Qeury_Result = GetObject(winmgt).InstancesOf("Win32_OperatingSystem")
    
    For Each oItem in oWMI_Qeury_Result
     iFreeMemory  = oItem.FreePhysicalMemory
    Next
    
    iFreeMemory = Round(iFreeMemory/(1024))
    
    Echo "Free: " & iFreeMemory & " MB"
    
    
    Set oWMI_Qeury_Result = GetObject(winmgt).InstancesOf("Win32_PhysicalMemory")
    
    For Each oItem in oWMI_Qeury_Result
      Echo oItem.Manufacturer & " - " & oItem.DeviceLocator & " - " & (oItem.Capacity/(1024*1024*1024)) & "GB - " & oItem.Speed  & "MHz"
    Next
    
  4. Get_OS.vbs:
    winmgt = "winmgmts:{impersonationLevel=impersonate}!//"
    
    Set oWMI_Qeury_Result = GetObject(winmgt).InstancesOf("Win32_OperatingSystem")
    
    For Each oItem In oWMI_Qeury_Result
      Echo Replace(oItem.Caption, "Microsoft ", "") & " (" & oItem.Version & " - " & oItem.CSDVersion & " - " & oItem.OSArchitecture & ")"
    Next
  5. Get_Hard_Drives.vbs:
    winmgt = "winmgmts:{impersonationLevel=impersonate}!//"
    
    Set oWMI_Qeury_Result = GetObject(winmgt).InstancesOf("Win32_DiskDrive")
    
    i = 1
    For Each oItem In oWMI_Qeury_Result
      Echo Round(oItem.Size/(1000*1000*1000)) & " GB (" & Round(oItem.Size/(1024*1024*1024)) & " GB  - " & oItem.Model & ")"
    Next
  6. Get_Optical_Drives.vbs:
    winmgt = "winmgmts:{impersonationLevel=impersonate}!//"
    
    Set oWMI_Qeury_Result = GetObject(winmgt).InstancesOf("Win32_CDROMDrive")
    
    For Each oItem In oWMI_Qeury_Result
      Echo oItem.Caption
    Next
  7. Get_Floppy_Drives.vbs
    :
    winmgt = "winmgmts:{impersonationLevel=impersonate}!//"
    
    Set oWMI_Qeury_Result = GetObject(winmgt).InstancesOf("Win32_FloppyDrive")
    
    i = 0
    For Each oItem In oWMI_Qeury_Result
      i = i + 1
    Next
    
    Echo i
  8. Get_USB_Ports.vbs:
    winmgt = "winmgmts:{impersonationLevel=impersonate}!//"
    
    Set oWMI_Qeury_Result = GetObject(winmgt).InstancesOf("Win32_USBController")
    
    i = 0
    For Each oItem In oWMI_Qeury_Result
      i = i + 1
    Next
    
    Echo i