News, tips, advice, support for Windows, Office, PCs & more. Tech help. No bull. We're community supported by donations from our Plus Members, and proud of it
Home icon Home icon Home icon Email icon RSS icon
  • BgInfo

    Posted on Rick Corbett Comment on the AskWoody Lounge

    Home Forums Tools BgInfo

    Tagged: ,

    This topic contains 8 replies, has 4 voices, and was last updated by  Rick Corbett 3 weeks, 6 days ago.

    • Author
      Posts
    • #1901114 Reply

      Rick Corbett
      AskWoody_MVP

      I’ve been using a freeware Sysinternals utility called BgInfo since 2006 – both at work and at home – to display system information on the Windows desktop.

      The default configuration shows 24 fields of info that can be displayed:

      bginfo-default

      At work it was invaluable for the helpdesk – all we had to do was ask a caller to read out the text on the bottom-right of their monitor where the computer name (asset no. really) and IP address were displayed. We could then remote into their computer immediately to save asking sometimes quite complicated questions which many users found difficulty answering.

      At home I got into the habit of using BgInfo on my own devices and those of my family and friends, particularly if I provided remote support.

      When the default info fields are not what you need, it’s possible to add custom fields of info:

      bginfo-custom-fields

      Once configured how you want it, save the configuration as a .BGI file.

      It’s probably easier if I provide an example of use…

      I have a friend who’s going to be moving 130 miles away. Her Dell laptop’s 128GB SSD is down to about 60GB free space. She keeps other media (except for iTunes music and photos) on a microSD card in an SD adapter kept permanently in the laptop’s SD card reader. If she phones for support it’s likely I’ll need to check how much free space she has left on the SSD and microSD card.

      This is when I found out (after all this time) a couple of BgInfo quirks: 1) it instantiates *every* network adapter, not just the active one; 2) its built-in Free Space field just doesn’t recognise microSD cards, only fixed and removable disks. As a result the initial display looked llike this:

      bginfo-before

      To reduce the amount of screen estate used I removed the Host Name field as superfluous then replaced the built-in IP Address field with a custom field based on a VBS script that looks for a network adapter where IP is enabled, i.e. the active adapter:

      strComputer = "."
      On Error Resume Next
      Set objWMIService = GetObject("winmgmts:" & "{impersonationLevel=impersonate}!\" & strComputer & "rootcimv2")
      Set IPSettings = objWMIService.ExecQuery ("Select * FROM Win32_NetworkAdapterConfiguration where IPEnabled = 'True'")
      
      For Each objIPv4 in IPSettings
      For i=LBound(objIPv4.IPAddress) to UBound(objIPv4.IPAddress)
      If InStr(objIPv4.IPAddress(i),":") = 0 Then Echo objIPv4.IPAddress(i)
      Next
      Next

      Next I created another very basic VBS script to query free space on the M: (for Media) drive, i.e. the microSD card, with some simple maths to convert the result to GB, rounded to 2 decimal places:

      Set objWMIService = GetObject("winmgmts:")
      Set objLogicalDisk = objWMIService.Get ("Win32_LogicalDisk.DeviceID='M:'")
      Wscript.Echo "E: "& Round(objLogicalDisk.FreeSpace /1024/1024/1024, 2) & " GB exFAT"

      The result was a much improved display:

      bginfo-after1

      I used another custom VBS script to read values from the registry to create the Build/Release field:

      Set WshShell = CreateObject("WScript.Shell")
      x=WshShell.RegRead ("HKLMSOFTWAREMicrosoftWindows NTCurrentVersionCurrentBuild")
      y=WshShell.RegRead ("HKLMSOFTWAREMicrosoftWindows NTCurrentVersionUBR")
      Echo x&"."&y
      

      Two more custom VBS scripts read the Start values of the DiagTrack service (aka ‘Telemetry’) and Windows Update services respectively (a value of 4 corresponds to ‘disabled’):

      Telemetry:

      Set objShell = CreateObject("WScript.Shell")
      strTemp = "HKEY_LOCAL_MACHINESYSTEMCurrentControlSetServicesDiagTrackStart"
      x=objShell.RegRead(strTemp)
      If x = 4 then
      	status = "Disabled"
      Else
      	status = "Not Disabled"
      End If
      Echo status
      

      Windows Update:

      Set objShell = CreateObject("WScript.Shell")
      strTemp = "HKEY_LOCAL_MACHINESYSTEMCurrentControlSetServiceswuauservStart"
      x=objShell.RegRead(strTemp)
      If x = 4 then
      	status = "Disabled"
      Else
      	status = "Not Disabled"
      End If
      Echo status
      

      I created a REG file to install a RUN entry to refresh the BgInfo data at every startup using the previously created .BGI config file:

      Windows Registry Editor Version 5.00
      
      [HKEY_LOCAL_MACHINESOFTWAREMicrosoftWindowsCurrentVersionRun]
      "BgInfo"="C:\Support\BgInfo\Bginfo.exe C:\Support\BgInfo\Win10.bgi /timer:0 /silent"
      
      

      Finally, I created a one-line BAT file to refresh the BgInfo details on demand and created a shortcut to it on her desktop:

      Call C:SupportBgInfoBginfo.exe C:SupportBgInfoWin10.bgi /timer:0 /silent

      Note that the latest version of BgInfo is 4.2.7 which – unfortunately – still doesn’t support PowerShell. If using Win 10 1903 then it’s important to use a BgInfo version other than 4.2.1 as this has a bug which misreports the OS edition.

      The forum software keeps removing backslashes so I’ve attached a ZIP file with the scripts I’ve used here:
      BGInfo-Win10

      Hope this helps…

      • This topic was modified 4 months, 2 weeks ago by  Rick Corbett.
      • This topic was modified 4 months, 2 weeks ago by  Rick Corbett.
      • This topic was modified 4 months, 2 weeks ago by  Rick Corbett.
      Attachments:
      3 users thanked author for this post.
    • #1901132 Reply

      DarienAL
      AskWoody Plus

      I also utilize a custom BGinfo template on all of our servers after discovering it a few years ago.

      The one thing I haven’t been able to get it to do would be to display ALL currently logged in users. This would help in some situations where a certain group has more than one person accessing a server attempting to “fix” something…

       

      Attachments:
    • #1901138 Reply

      Rick Corbett
      AskWoody_MVP

      Aargh! I’ve replaced the code in my first post because the forum software strips out backslashes or reduces 2 backslashes to just one (either action breaks the code completely)… and the forum software just strips them out again. This is ridiculous.

      DO NOT copy/paste the code from the post above. Instead use the code in the 1901139 file that I’ve attached. Here it is again: BGInfo-Win10-1

      Attachments:
    • #1901152 Reply

      Rick Corbett
      AskWoody_MVP

      The one thing I haven’t been able to get it to do would be to display ALL currently logged in users.

      Ah, I was on the helldesk side of things, not server-side, so didn’t run into that.

      If you’re ‘DarienA’ from the Spiceworks community, did none of the suggestions pan out?

      I also used the Technet BgInfo forum for any queries.

    • #1901153 Reply

      DarienAL
      AskWoody Plus

      I am 🙂  They did not, unfortunately . To be clear one actually did but it required everyone who rdp’d into a server to have server admin rights to run correctly and that was a non-starter in some situations.

      I’ll check out the technet forum.

    • #2005391 Reply

      anonymous

      Hi new to BGinfo, just came across it recently

      Is there a way to Hide or not show this info….or not have the BGinfo program run

      it is on a citrix terminal server and ever user that logs into their terminal session has this info appear on their screen and are freaked out about it

      Any insight on how to turn this off would be much appreciated

      1 user thanked author for this post.
    • #2005397 Reply

      DarienAL
      AskWoody Plus

      Your users are freaked out because the server is displaying basic server information? That seems usual… anyway bginfo is usually launched from a shortcut in the all users windows startup folder so you should find it there.

    • #2005645 Reply

      Paul T
      AskWoody MVP

      Tell your users to calm down.
      You need that info when the users call in to get a problem fixed so leave it in place.

      cheers, Paul

    • #2007005 Reply

      Rick Corbett
      AskWoody_MVP

      Is there a way to Hide or not show this info….or not have the BGinfo program run

      I run it from the RUN key of HKEY_LOCAL_MACHINE so ALL users see it. However, I could choose instead to run it from the RUN key of HKEY_CURRENT_ USER for one or more users.

      Alternatively you could use a shortcut to call it, either from within the Startup folder for All Users or, again, from the Startup folder of one or more users.

      However, it may be that you just want the info hidden but available on demand. With that in mind, have a look at the commandline switches to display the info from either a popup or from the taskbar.

      Just check BgInfo‘s built-in Help for the following info:

      You can use the /popup or /taskbar options if you prefer to see the information without it updating your system’s wallpaper.

      If you use one of these switches linked to a desktop shortcut then your users will ONLY see the BgInfo details if they choose to.

      So, for example, a default BgInfo display that updates the background wallpaper may look like this:

      bginfo_desktop

      If you use the /popup switch then the user’s wallpaper will *not* be changed. Instead, your users will see a popup window with the same info:

      bginfo_popup

      If you use the /taskbar switch then, when BgInfo is run, it will display just an icon in the Notification Area:

      bginfo_taskbar

      Clicking on the taskbar icon will display the popup. This may be your best choice as BgInfo can be run from user login and exit leaving just the taskbar icon.

      Have a look at How-To Geek‘s tutorial for more info: Using BgInfo to Display System Information on the Desktop

      Note that BgInfo runs, does its business (screen update, popup or taskbar icon) then exits… it does *not* stay resident… hence why you have to call it either manually or programmatically.

      Note also that in a multi-user environment you’ll also need to use the /nolicprompt switch to suppress the default license agreement… otherwise your users will be complaining again. 🙂

      PS – Whilst BgInfo is hugely convenient, it doesn’t support PowerShell (yet). If BgInfo‘s /popup or /taskbar methods are what you are looking for then you could always roll your own (using PowerShell, AutoHotkey and/or an HTA).

      Hope this helps…

      Attachments:
      2 users thanked author for this post.

    Please follow the -Lounge Rules- no personal attacks, no swearing, and politics/religion are relegated to the Rants forum.

    Reply To: BgInfo

    You can use BBCodes to format your content.
    Your account can't use Advanced BBCodes, they will be stripped before saving.