/bundles/itninjaweb/img/Breadcrumb_cap_w.png
(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   [ - ] Hide Comments

Comments

Please log in to comment

Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
Answer this question or Comment on this question for clarity

Answers

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.
Answered 12/16/2011 by: dchristian
Red Belt

Please log in to comment
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
Answered 12/19/2011 by: snissen
Fourth Degree Green Belt

Please log in to comment
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.
Answered 12/20/2011 by: snissen
Fourth Degree Green Belt

Please log in to comment
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.
Answered 12/20/2011 by: cblake
Red Belt

Please log in to comment