/build/static/layout/Breadcrumb_cap_w.png

K1000 - Custom Inventory Rule - Not Working Due To Comma In Registry Path

Wanting to pull IPC MAC Addresses from our devices via custom inventory rule.  Having issues due to the registry path.

Syntax:

RegistryValueReturn(registryPath, name, type)


CIR entry:  RegistryValueReturn(HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Cisco Systems, Inc.\Communicator,HostName,REG_SZ)


Notice the comma in the "Cisco Systems, Inc." path name.  Due to this, it's not returning desired results.  Tried encompassing the path in parenthesis or ( ) and neither worked.  For the heck of it, I removed the comma from the name with it obviously not working.  Is there a wildcard or something else?


0 Comments   [ + ] Show comments

Answers (2)

Answer Summary:
RegistryValueReturn(HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Cisco Systems{{comma}} Inc.\Communicator,HostName,TEXT)
Posted by: chucksteel 4 years ago
Red Belt
2

Top Answer


Comments:
  • In this case the comma is in the registry path and did not work in my testing, Were you able to get it to work when not used in a value? - KevinG 4 years ago
    • I didn't test in my environment. I wonder if it makes a difference if you use HKLM64 instead of the WOW6432 path. - chucksteel 4 years ago
  • This worked, thank you!

    RegistryValueReturn(HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Cisco Systems{{comma}} Inc.\Communicator,HostName,TEXT) - KaceBuddy 4 years ago
    • Great. Please mark the question as answered and supply a summary. - chucksteel 4 years ago
Posted by: KevinG 4 years ago
Red Belt
1

I was able to reproduce this issue.

A possible workaround would be to create a script to write the value of HostName to a text file and read it in using ShellCommandTextReturn( command).

Example: ShellCommandTextReturn(cmd /c type c:\WINDOWS\TEMP\HelloWorld.txt)


On a side note, REG_SZ in your example above should be TEXT.

Type can be TEXT, NUMBER, or DATE

 
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