Trying to do a custom inventory on a reg value using RegistryValueEquals
This is the syntax, which I am not sure is correct since it isn't working
RegistryValueEquals(HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Boeing\CAx\DFoP\B19SP5PRALL,HFX,16)
Attached is screenshot of the registry


0 Comments   [ + ] Show 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.

Answers

0
Is this a 64bit OS?
Answered 03/17/2010 by: dtuttle
Purple Belt

Please log in to comment
0
Your registry key path is wrong. Get rid of the "Microsoft" since Boeing is not under the Microsoft key.

RegistryValueEquals(HKEY_LOCAL_MACHINE\SOFTWARE\Boeing\CAx\DFoP\B19SP5PRALL,HFX,16)
Answered 03/17/2010 by: airwolf
Tenth Degree Black Belt

Please log in to comment
0
LOL, senior moment! Thanks!
Answered 03/17/2010 by: mlathrop
Fifth Degree Brown Belt

Please log in to comment
0
Trying to do a similar thing.

I have a company tree (UMC) that I'm starting to build up for my tricky software.

Trying to evaluate RegistryValueEquals(SOFTWARE\UMC\CadDuct, Version, 2.38.218) but it always returns false.

However, an export from the registry results in

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\UMC\CadDuct]
"Version"="2.38.218"

I have similar results that return true (RegistryValueEquals(HKEY_CLASSES_ROOT\Software\Adobe\Acrobat\Exe, BrowserFix,True))
That's a custom registry key that I put in

So what's the difference other than the key location and that it's text. The agent is supposed to be able to do version comparisons according to the admin guide.
Answered 03/19/2010 by: KnottyMan
Senior Yellow Belt

Please log in to comment
0
Trying to evaluate RegistryValueEquals(SOFTWARE\UMC\CadDuct, Version, 2.38.218) but it always returns false.

You forgot HKLM before SOFTWARE...

RegistryValueEquals(HKLM\SOFTWARE\UMC\CadDuct,Version,2.38.218)
Answered 03/20/2010 by: airwolf
Tenth Degree Black Belt

Please log in to comment
0
Tip:
to determine what the registry value is you can create a custom data field to have it spit out that value in inventory. The
RegistryValueReturn(HKEY_LOCAL_MACHINE\SOFTWARE\UMC\CadDuct,Version,TEXT)

I haven't seen this discrepancy with registry keys but I have with file versions -- where the file version shows on the PC differently in different places. In one place it might show as 2.38.218 and in another as 2,38,218

So you can use that technique to find out what kbox sees it as and then create your custom inventory field.
Answered 03/20/2010 by: GillySpy
Seventh Degree Black Belt

Please log in to comment
0
Per page 83 in the admin guide, the example provided is "RegistryValueEquals(SOFTWARE\Microsoft\Internet Explorer\Version Vector,IE,6.000)" and I seem to recall from jumpstart that this was an allowed shortcut that the agent would recognize. I thought that I also tried the absolute path per syntax (p83) "RegistryValueEquals(string absPathToKey, string valueName, string valueToTest)".

Also from page 83, "Contain a key that exists under LocalMachine." so seeing this, why need to specify HKLM... However, that is blown out of the water since I do have a separate test in HKClassesRoot that does work...

Did my admin guide not update last time I did an upgrade and the bot behavior change? I will double check with specifying the abspath and try again.
Answered 03/21/2010 by: KnottyMan
Senior Yellow Belt

Please log in to comment
0
I've always used absolute paths and I've never had any issues.

Have you tried Gerald's suggestion? It will at least verify whether or not the value you are trying to match is correct.
Answered 03/22/2010 by: airwolf
Tenth Degree Black Belt

Please log in to comment
0
Tried Gerald's suggestion, no data returned, but in the debug log I got a true.
True = RegistryValueReturn(HKEY_LOCAL_MACHINE\SOFTWARE\UMC\CadDuct, Version, TEXT)

Tried absolute path, still returns false.
False = RegistryValueEquals(HKEY_LOCAL_MACHINE\SOFTWARE\UMC\CadDuct, Version, 2.38.218)

Stumped

Guess I'll try to see if it will give me a true for KeyExists to see if it can find the key at all...
Answered 03/24/2010 by: KnottyMan
Senior Yellow Belt

Please log in to comment
0
False = RegistryKeyExists(HKEY_LOCAL_MACHINE\SOFTWARE\UMC\CadDuct)

$%^)*$#@%

I know it works elsewhere. Another one of my bread crumbs:
True = RegistryKeyExists(HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Print\Forms\CADSizes100112)
Answered 03/24/2010 by: KnottyMan
Senior Yellow Belt

Please log in to comment
0
Sure does look like that's the right path.



Answered 03/24/2010 by: KnottyMan
Senior Yellow Belt

Please log in to comment
0

Tried Gerald's suggestion, no data returned, but in the debug log I got a true.
True = RegistryValueReturn(HKEY_LOCAL_MACHINE\SOFTWARE\UMC\CadDuct, Version, TEXT)

There is definitely an issue if the registry key can be read but no data is returned. I'd suggest submitting a support ticket so KACE can take a look.
Answered 03/24/2010 by: airwolf
Tenth Degree Black Belt

Please log in to comment
0
Interesting. It works on my XP32 box. My testing box for this app is a Vista64 VM. Both have latest client. I'm going to revert my VM to see if it's something local, but one of my other MI's to real Vista64 machines failed hard as well.
Answered 03/25/2010 by: KnottyMan
Senior Yellow Belt

Please log in to comment
0
On x64 machines, 32-bit software keys are stored in HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node. Try this:

RegistryValueEquals(HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\UMC\CadDuct, Version, 2.38.218)
Answered 03/25/2010 by: airwolf
Tenth Degree Black Belt

Please log in to comment
0
Well there's a critical piece of information I left out. How dumb is this whole Program Files, Program Files (x86) business and now a separate Software tree...? Good thing this CadDuct app is only for V64 clients, otherwise I'd have dupes all over the place!

WHY MS, why oh why are you so retarded? One cohesive tree please!


Thanks Andy, that did it.
Answered 03/25/2010 by: KnottyMan
Senior Yellow Belt

Please log in to comment
0
Well there's a critical piece of information I left out.  How dumb is this whole Program Files, Program Files (x86) business and now a separate Software tree...?  Good thing this CadDuct app is only for V64 clients, otherwise I'd have dupes all over the place!

WHY MS, why oh why are you so retarded?  One cohesive tree please!



Windows registry/file redirection for 32bit/64bit apps is a pain to deal with, but without it we wouldn't be able to run 32bit apps on 64bit OS's. things like hklm\software\wow6432node is the 32bit registry, which is the system.dat file that is in c:\windows\syswow64 folder. This folder also contains all the dlls and windows programs needed to run 32bit apps. if you run the cmd.exe in that folder you are in the 32bit shell, everything happens with redirection, if you run the cmd.exe in system32 you are using 64bit shell and things are done without redirection.


I know this goes way past why you originally asked, but I have been implementing 64bit OS's here for a while due to the memory capacity it has, so I have had to due alot of research on this redirection. Kbox doesn't have great support for 64bit redirection yet, things like Custom inventory rules in the 32bit PF dir dont work so well, and writing to the 64bit reg is an extra step. I hope they will come around to it soon though
Answered 03/25/2010 by: dtuttle
Purple Belt

Please log in to comment
Answer this question or Comment on this question for clarity