Embedded substitution problem

(imported topic written by DotA)

Hi,

I’m trying to combine two working relevancies into one using embedded substitution. Basically retrieving a GUID string from the registry to look up the existance of another reg key based on the retrieved GUID.

The two separate relevancies are:

1)value “netcfginstanceID” of key “HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Class{4D36E972-E325-11CE-BFC1-08002bE10318}\0016” of registry as string

This returns value of {3CFA47EC-2DC6-46E4-9CE9-620C0FF8BF4F}

2)exists value “MTU” of key “HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\Interfaces{3CFA47EC-2DC6-46E4-9CE9-620C0FF8BF4F}” of registry

This returns TRUE (or FALSE)

I’d like to insert relevancy 1) into relevancy 2) in place of the {GUID} to detect the if the MTU setting exists. This is what I have so far:

exists value “MTU” of key ((“HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\Interfaces\value netcfginstanceID of key HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Class{4D36E972-E325-11CE-BFC1-08002bE10318}\0016” of registry) as string) of registry

Currently it returning “Singular expression refers to nonexistent object.”

Not sure if we are attempting to ask BigFix to do something it can’t, but any help would be appreciated.

Thank you in advance!

(imported comment written by SystemAdmin)

Without improving any relevance, here’s how to combine them…

Start with your second relevance so it looks more like this:

exists value “MTU” of key “{3CFA47EC-2DC6-46E4-9CE9-620C0FF8BF4F}” of key “HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\Interfaces” of registry

Now you can take the guid, and replace it with the first relevance within parenthesis…

exists value “MTU” of key (value “netcfginstanceID” of key “HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Class{4D36E972-E325-11CE-BFC1-08002bE10318}\0016” of registry as string)

of key “HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\Interfaces” of registry

Paul

(imported comment written by Bill.Ehardt)

I came up with something like this to include error checking… if you are on v8

((exists key (“HKLM\System\CurrentControlSet\Services\TCPIP\Parameters\Interfaces” &(value “netcfginstanceID” of key “HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Class{4D36E972-E325-11CE-BFC1-08002bE10318}\0016” of registry as string)) whose (exists value “MTU” of it) of registry)|False)