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

JV 1 Reputation point
2021-04-11T20:43:10.607+00:00

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

Sysinternals
Sysinternals
Advanced system utilities to manage, troubleshoot, and diagnose Windows and Linux systems and applications.
1,087 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Brian Goodgroves 1 Reputation point
    2022-05-13T23:53:34.633+00:00

    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.

    0 comments No comments