question

JotVau-3264 avatar image
0 Votes"
JotVau-3264 asked BrianGoodgroves-001 answered

bginfo 4.28 - bug in saving and/or loading complex user defined fields detected

Hi all,

I think I detected a bug in bginfo when saving and loading a more complex user defined wmi query.

My situation:
I am saving my settings in a bgi file, not in the registry
I wanted to shorten the network output of bginfo, so I tried to eliminate some of the interfaces that I am not interested in.

First: the Hyper-V interfaces
That works great with a user defined field (I named it my_networkdescr) and this wmi query

 SELECT Description FROM Win32_NetworkAdapter WHERE NetConnectionStatus = 2 AND NOT (Description LIKE 'Hyper-V%')

The result:
- the wmi evaluation within bginfo works well
- the output on the desktop is ok
When I save my config to a bgi file and start bginfo afterwards with this bgi file, everything works as expected.
So far, so good...

Now the problems begins:
I additionally wanted to eliminate the output of the Microsoft loopback interface.
Therefore I extended my user defined field my_networkdescr like this:

 SELECT Description FROM Win32_NetworkAdapter WHERE NetConnectionStatus = 2 AND NOT (Description LIKE 'Hyper-V%' OR Description LIKE '%Loopback%')

Now this happens:
When I evaluate the query within bginfo, my query result looks great --> no unwanted Hyper-V Interface and no unwanted loopback interface any more
When I click apply the output on the desktop looks also great

But when I save my bgi file and load it afterwards, stange things happen:
bginfo does not know SOME of my user defined fields any more

My user defined fields that are alphabetically sorted before my_networkdescr are present and ok.
My user defined field my_networkdescr is gone.
All alphabetically subsequent user defined fields are also gone.

Gone means
- they are gone in the "Fields" list at the right border of the bginfo gui
- they are gone on the output on the desktop

When I take a look at the bgi file with notepad++, I can still see text that reminds me of my query my_networkdescr and the subsequent queries.
So my extended query has been saved, maybe not totally correct.

The parser in bginfo seems to load the user defined queries in an alphabetic order.
This works well until my extended my_networkdescr is to be read and interpreted.
This user defined field an all the subsequent fields seem to be ignored.


That means to me:
1) Running, saving and loading this user defined field works well:
SELECT Description FROM Win32_NetworkAdapter WHERE NetConnectionStatus = 2 AND NOT (Description LIKE 'Hyper-V%')

2) RUNNING this extended user defined field works well
SELECT Description FROM Win32_NetworkAdapter WHERE NetConnectionStatus = 2 AND NOT (Description LIKE 'Hyper-V%' OR Description LIKE '%Loopback%')

3) Saving and loading this extended user defined field fails
SELECT Description FROM Win32_NetworkAdapter WHERE NetConnectionStatus = 2 AND NOT (Description LIKE 'Hyper-V%' OR Description LIKE '%Loopback%')
Aditionally all alphabetically subsequent user defined fiels are ignored

Is anyone able to verify my investigation and to find a solution for this behaviour?


Thanks a lot!


JV

windows-sysinternals-bginfo
· 2
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

I have the same situation.

0 Votes 0 ·

I also have this exact issue which is odd as it previously worked just fine... Nothing has changed on my system as far as I am aware other that the updates being installed from Windows Update.

As I write this I am running Windows 10 Home x64 (Build 10.0.19044).

Most of my fields link to some .vbs scripts and only a couple are WMI calls.

 <Host Name>
 <System Type> (SELECT SystemFamily FROM Win32_ComputerSystem)
 Logged in as: <User Name> 
    
 <Get Computer Model> (Computer Model.vbs)
 <Get OS Info> (Get OS Info.vbs)
    
 -- Network ----------------------------
 Internal IP Address: <Get IPv4 Address> (WMI: SELECT IPAddress FROM Win32_NetworkAdapterConfiguration WHERE IPEnabled=TRUE and NOT Description LIKE "%VMWare%" and NOT Description LIKE "%Virtual%")
 Subnet Mask: <Get Subnet Mask> (WMI: SELECT IPSubnet FROM Win32_NetworkAdapterConfiguration WHERE IPEnabled=True  and NOT Description LIKE "%VMWare%" and NOT Description LIKE "%Virtual%")
 Default Gateway: <Get IPv4 Default Gateway> (Get IPv4 Default Gateway.vbs)
 Mac Address: <Get Mac Address> (Get Mac Address.vbs)
 External IP Address: <Get Public IPv4 Address> (Get Public IPv4 Address.vbs)
 ------------------------------------------
    
 Last restart was on <Boot Time>
 Last full shutdown on <Get Shutdown Time> (Get Shutdown Time.vbs)

NOTE: I tried removing the large WMI queries but it's still doing the same thing.. No mater what, it previews correctly but just will not save correctly.

Same for the x86 and x64 versions too.

Can ANYONE offer an explanation?

0 Votes 0 ·

1 Answer

BrianGoodgroves-001 avatar image
0 Votes"
BrianGoodgroves-001 answered

I think I may have found the issue.

So here is what I found, when running a long multi conditional WMI command like the following for example - it will cause all of the above mentioned issues.

 SELECT IPAddress FROM Win32_NetworkAdapterConfiguration WHERE IPEnabled=TRUE and NOT Description LIKE "%VMWare%" and NOT Description LIKE "%Virtual%"

However, if I take out the second 'and NOT' condition (see below) it works flawlessly.

 SELECT IPAddress FROM Win32_NetworkAdapterConfiguration WHERE IPEnabled=TRUE and NOT Description LIKE "%VMWare%"

This would lead me to believe that BGInfo has an issue performing conditional WMI queries.

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.