Registry search for license keys

(imported topic written by bjelsc191)

Hello,

I am trying to get specific keys that are located in different branches of the registry below HKLM\Software\Autodesk. I don’t know each of the specific branch paths and am searching the registry for the values.

Unfortunately the 4 keys being looked for may not exist for each product. And there are lots of branches that don’t have these keys at all.

This analysis script works but provides a blank line in the analysis report for each branch that doesn’t have the keys.

((if(exists value “ProductName” of it) then (value “ProductName” of it as string)else “”) & (if(exists value “SerialNumber” of it) then (" - " & value “SerialNumber” of it as string)else “”) & (if(exists value “Release” of it) then (" - " & value “Release” of it as string)else “”) & (if(exists value “StandaloneNetworkType” of it) then (" - " & value “StandaloneNetworkType” of it as string)else “”)) of (it;keys of it; keys of keys of it; keys of keys of keys of it; keys of keys of keys of keys of it) of key “HKEY_LOCAL_MACHINE\SOFTWARE\Autodesk” of registry

Is there a way to record only branches that have some data or that have a ProductName?

Thanks.

(imported comment written by BenKus)

Does this work?

q: ((if(exists value “ProductName” of it) then (value “ProductName” of it as string)else “”) & (if(exists value “SerialNumber” of it) then (" - " & value “SerialNumber” of it as string)else “”) & (if(exists value “Release” of it) then (" - " & value “Release” of it as string)else “”) & (if(exists value “StandaloneNetworkType” of it) then (" - " & value “StandaloneNetworkType” of it as string)else “”)) of (it;keys of it; keys of keys of it; keys of keys of keys of it; keys of keys of keys of keys of it) whose (exists value “ProductName” of it) of key “HKEY_LOCAL_MACHINE\SOFTWARE\Autodesk” of registry

Or… simplified with new BigFix “|” operator in 8.0:

q: ((value “ProductName” of it as string | “”) & " - " & (value “SerialNumber” of it as string | “”) & " - " & (value “Release” of it as string | “”) & " - " & (value “StandaloneNetworkType” of it as string|"")) of (it;keys of it; keys of keys of it; keys of keys of keys of it; keys of keys of keys of keys of it) whose (exists value “ProductName” of it) of keys “HKEY_LOCAL_MACHINE\SOFTWARE\Autodesk” of registry

Ben

(imported comment written by bjelsc191)

Yes, both are working. Thank you for your help!!

(imported comment written by Nitin_Gupta91)

Hi,

Can you please help me in creating analysis for finding

Machine ID

version

file size

license keys

for a particular software on machines reporting to BigFix console.

Thanks.