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
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)
Please log in to answer
Posted by:
snissen
13 years ago
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.
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
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.
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
Posted by:
snissen
13 years ago
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
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.
so that the conversation will remain readable.