Relevance

(imported topic written by koi9991)

How do you write a relevance for this key?

HKEY_CURRENT_USER\Software\Adobe\Acrobat Reader\9.0\JSPrefs

“bEnableJS”=dword:00000000

Thanks

(imported comment written by BenKus)

What would you like to do? Retrieve the value for the logged in user?

Try this:

(values “bEnableJS” of keys “Software\Adobe\Acrobat Reader\9.0\JSPrefs” of current user keys (logged on users ) of registry)

Ben

(imported comment written by Nitin_Gupta91)

i have to fetch value of asset tag from the following registry keys :-

HKEY_LOCAL_MACHINE\SOFTWARE\Motorola\xxxAssetInfo

HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Motorola\xxxAssetInfo

I have tried to create one but not sure how to match them both to make them one :-

if (exists key “HKEY_LOCAL_MACHINE\SOFTWARE\Motorola\xxxAssetInfo” of native registry) then if (exists value “AssetTag” of key “HKEY_LOCAL_MACHINE\SOFTWARE\Motorola\xxxAssetInfo” of native registry) then value “AssetTag” of key “HKEY_LOCAL_MACHINE\SOFTWARE\Motorola\xxxAssetInfo” of native registry as string else “AssetTag does not exists” else “AssetTag Key does not exist”

if (exists key “HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Motorola\xxxAssetInfo” of native registry) then if (exists value “AssetTag” of key “HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Motorola\xxxAssetInfo” of native registry) then value “AssetTag” of key “HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Motorola\xxxAssetInfo” of native registry as string else “AssetTag does not exists” else “AssetTag Key does not exist”

Please help me with the same, if possible.

Thanks.

(imported comment written by SystemAdmin)

If i understand correctly, you want to check one key “HKEY_LOCAL_MACHINE\SOFTWARE\Motorola\xxxAssetInfo” for 32 bit machines and “HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Motorola\xxxAssetInfo” for 64 bit machines.

Relevance has a concept of am “x32 registry”. If you use the x32 registry in your relevance expression in place of “native registry”, then relevance will automatically look under the wow6432node on 64 bit machines, without you having to specify it, so you can do this and it should handle it in both cases:

( if (exists key “HKEY_LOCAL_MACHINE\SOFTWARE\Motorola\xxxAssetInfo” whose (exists value “AssetTag” of it) of it) then ( value “AssetTag” of key “HKEY_LOCAL_MACHINE\SOFTWARE\Motorola\xxxAssetInfo” of it as string) else “AssetTag does not exists”) of x32 registry

(imported comment written by JackCoates91)

The Windows Registry Wizard will automatically produce this sort of structure (Select “Target all machines” option on second screen, then select “Optional: Use 32-bit registry on 64-bit machines”).

(imported comment written by Nitin_Gupta91)

Thanks for the help and i got the point described.

It works fine !!!