Relevance question about multiple registry keys

So I’m struggling here and my troubleshooting skills are not up to par today. Here is my relevance

q: (concatenation of (“HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server” ; (values of key “HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server\Instance Names\SQL” of native registry as string) ; “\MSSQLServer”)) of native registry
A: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server\MSSQL10_50.MSSQLSERVER\MSSQLServer

The problem I’m running into is on computers that have 2 or more instances, in those cases, you get

A: HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server\Instance1Instance2\MSSQLServer

My ultimate goal is that I need to set a configuration for each instance, but as you can see, this will fail due to multiple instance names in the path. Help??? How do I write my actionscript to loop for each instance?

regset64 “[{(concatenation of (“HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server” ; (values of key “HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server\Instance Names\SQL” of native registry as string) ; “\MSSQLServer”)) of native registry}]” “ErrorLogSizeInKb”=dword:004c4fa0

Did you ever figure this out? I wish we could use powershell to get values into bigfix properties.

The last I recall, you can’t process a loop natively in ActionScript but you can leverage ActionScript, relevance, parameters and an external command to process multiple results. Just as a crude example, say you want to copy all the .TXT files from Folder1 into Folder2.

We can create an action that parses all the filenames as a parameter then we can use a DOS “for” to loop each file and do something with it, in this case copy it to Folder2.

parameter "filestocopy"="{concatenation " " of pathnames of files whose (name of it ends with ".txt") of folders "D:\TEMP\Folder1"}"
runhidden cmd.exe /c "for %a in ({parameter "filestocopy"}) do copy %a D:\TEMP\Folder2"

Once run, then end result is

1 Like