So, I'm working through the guide here: http://www.kace.com/support/resources/kb/article/custom-inventory-or-file-synchronization-stops-working (thanks again @dugullett and @Nico_K!) and stumped on why this CIR isn't working:

RegistryValueReturn(HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon\CMGShield\Servlet, ,TEXT)

Here's the corresponding lines from kdeploy.log:

[Fri May 10 12:57:36 2013] [CDeployController::ExecuteCustomInventoryRule] issuing rule [RegistryValueReturn(HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon\CMGShield\Servlet, ,TEXT);]
[Fri May 10 12:57:36 2013] Custom Inventory Rule failed on registry operation: logop=6, key='HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon\CMGShield\Servlet': error=183
[Fri May 10 12:57:36 2013] [CDeployController::ExecuteCustomInventoryRule] statement result: "", FALSE

Anyone have any ideas?  I have a feeling it's the spaces, but I tried deleting them and that doesn't seem to help.


Answer Summary:
I discovered the CIR was working properly on my 32bit XP machines and airwolf helped me see why my Win 7 x64 machines weren't: I needed to specify HKLM64 instead of just HKLM. Thanks, everyone!
0 Comments   [ - ] Hide Comments


Please log in to comment

Answer this question or Comment on this question for clarity



Looks like the value doesn't exist in the registry or there is a permissions issue.

Answered 05/10/2013 by: airwolf
Tenth Degree Black Belt

  • I have confirmed the value exists on my test machine. I'm running: runkbot.exe -s (as system?) so there shouldn't be a permission problem, should it? I'll try from the console now...

    Update: doing "Force Update" from the console returns the same result in my kdeploy.log
  • Are the systems the rule isn't working on 64-bit? If so and the values are truly in HKLM and not Wow6432Node, you'll have to use HKLM64 in the path in the rule. Registry CIR functions will search the 32-bit hive, by default.
    • That did it! I created a seperate CIR or HKLM64! Thanks, airwolf!
      • Just for future reference, that error in the logs usually means the key doesn't exist. And in most cases I've seen it's because of the 32-bit vs. 64-bit hive issue.
  • Thanks very much! You were right from the start, airwolf! Key didn't exist at the location I specified even though it looks like it is. Great catch and def great info for future reference!
Please log in to comment

Put quotes " around the items that have spaces and see if that helps.

Answered 05/10/2013 by: Timi
Seventh Degree Black Belt

  • This also failed:

    RegistryValueReturn("HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon\CMGShield\Servlet", ,TEXT)

    I remember having trouble getting this to work before I upgraded to 5.4 SP1... It's a default value, so that's why the two commas with the space between. Maybe I need quotes there...
  • Current CIR:
    RegistryValueReturn(HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon\CMGShield\Servlet, ,TEXT)

    I found a machine that it is working on (XP client, but same agent version 5.4.10622):

    [Fri May 10 14:25:02 2013] [CDeployController::ExecuteCustomInventoryRule] statement result: "", FALSE
    [Fri May 10 14:25:02 2013] [CDeployController::ExecuteCustomInventoryRule] issuing rule [RegistryValueReturn(HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon\CMGShield\Servlet, ,TEXT);]
    [Fri May 10 14:25:02 2013] [OUT] https://cmg.somewhere.com:8081/xapi [OUT]

    However, I'm still having a problem on my Windows 7 box. Oh no... wonder if I didn't allow the CIR to run on Windows 7! :(
Please log in to comment