/build/static/layout/Breadcrumb_cap_w.png

Custom inventory field questions

(I know I saw the answer to this somewhere, but I can't find it now.)

When creating a custom inventory rule using RegistryValueReturn, how do you specify that the entry to pick up is the one that displays as (Default) in the registry key? I believe some scripting languages refer to those entries as @.

Another question: Is RegistryValueReturn limited to HKLM, or will it work for HKCU or HKCR as well? Sande

0 Comments   [ + ] Show comments

Answers (4)

Posted by: snissen 13 years ago
Fourth Degree Green Belt
2
Well, with no answers here, I decided to try something, despite the risks. And this is what worked for me, using the latest 5.1.38724 KBOX Agent on Windows 7:

RegistryValueReturn(registryKeyWhoseDefaultYouWant,,TEXT)

In other words, simply omit the registry entry name parameter.

If there is another solution, I'd someone to mention it here.
Posted by: cblake 13 years ago
Red Belt
2
Sorry to chime in so late; Sande- your solution is correct and AFAIK the only known search criteria; null.
The good news is that custom inventory is just that- inventory; it would really affect anything- it's pass or fail. If you write it badly, it fails :)
The exception being shellcommandXXX(somecommandhere); those could be potentially dangerous to execute, but again they are return values.

As for the registry hives- as dchristian said; there's some limitations there due to the way they and the agent run under the system context. portions of, and some hives are not accessible to the system context.
Posted by: dchristian 13 years ago
Red Belt
0
You can use registry value return looking at other hives.

Just be careful as the values may change depending on who is logged in.
Posted by: snissen 13 years ago
Fourth Degree Green Belt
0
Can anyone else answer my main question: How do you indicate the default registry entry, the one that shows up as "(Default)" in RegEdit, or as @ in a .reg file?

With scripts, I can play with things on only 1-2 computers, but with custom inventory fields, I'm loathe to play because it affects all the machines right away.

An answer would be greatly appreciated! Sande
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.

Don't be a Stranger!

Sign up today to participate, stay informed, earn points and establish a reputation for yourself!

Sign up! or login

Share

 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ