Minor issue in BES Inventory and License property (ID 17)

(imported topic written by MrFixit)

Folks I was working on cleaning up some retrieved properties that sometimes reports errors on some systems and I ran into this.

For the property “Names of Programs Run at Startup” ID 17 in BES Inverntory and License I was getting errors on a couple dozen systems. It turns out that trigger for the error was a string value in the (Default) of the regkey “HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run”. I was able to correct the situation by either deleting that value or changing the relevence slightly.

q: if (exists key “HKLM\Software\Microsoft\Windows\CurrentVersion\Run” whose (exists value of it) of registry) then (if (NOT exists name of it AND it = “”) then nothing else (name of it as string as uppercase)) of values of key “HKLM\Software\Microsoft\Windows\CurrentVersion\Run” of registry else “None”

E: Singular expression refers to nonexistent object.

q: if (exists key “HKLM\Software\Microsoft\Windows\CurrentVersion\Run” whose (exists value of it) of registry) then (if (NOT exists name of it AND it = “”) then nothing else (names of it as string as uppercase)) of values of key “HKLM\Software\Microsoft\Windows\CurrentVersion\Run” of registry else “None”

A: MCAFEEUPDATERUI

(imported comment written by BenKus)

Interesting…

If I understand this correctly, this error would occur only if you had a default value of the key “HKLM\Software\Microsoft\Windows\CurrentVersion\Run” that is not blank (which I am not sure why this would be the case)…

Can you check this for me? You can check manually or run this query:

value “” of key “HKLM\Software\Microsoft\Windows\CurrentVersion\Run” of registry

What does it return?

Ben

(imported comment written by MrFixit)

Ben

Here is the results of that query along with the query from the retrieved property.

q: value “” of key “HKLM\Software\Microsoft\Windows\CurrentVersion\Run” of registry

A: c:\Tools\Namechg.bat

The value was placed there a few years back and was though to have been removed until I started investigating these errors. I still struggle some when plurals are expected or not in relevence so it usually takes me a few tries in the debugger before I get things right so this didn’t strike me as as intersting but you are the expert.

-Gary

(imported comment written by BenKus)

Hey Gary,

Our relevance didn’t expect there to be a value there (I am not sure if it is valid and Windows will run it) so that is why I thought it was interesting… I will tell our Fixlet team about this and they should be able to update the property.

Ben