Hey All,
I am getting some weird issues with REGSET since we moved from 9.2.7.53 up to 9.5.3.211
I have a task that will query for the information on different COM ports and in that info is the Baud rate. I then have relevance looking over the output from cmd.exe and selecting just the Baud rate for COM8 or giving a generic error to a parameter. I am then trying to store that parameter in a reg key but this is where it is failing. Action Script follows:
if {exists file whose (name of it contains "baud.txt") of folder "c:\BigFix\USB"}
delete c:\BigFix\USB\baud.txt
endif
waithidden cmd.exe /C mode > c:\BigFix\USB\baud.txt
if {exists file whose (name of it contains "baud.txt") of folder "c:\BigFix\USB"}
parameter "Baud" = "{lines whose (line number of it = maximum of (it as integer + 2) of line numbers of lines whose (it contains "COM8") of file "c:\BigFix\USB\baud.txt") of file "c:\BigFix\USB\baud.txt"}"
elseif {not exists file whose (name of it contains "baud.txt") of folder "c:\BigFix\USB"}
parameter "Baud" = "No COM8 Device Found"
endif
regset "[HKEY_LOCAL_MACHINE\Software\Test\Device\]" "BaudRate"="{parameter "Baud"}"
When on 9.2.7.53 this worked fine and all was great. I have confirmed this is still working with the old fixlet debugger of the same version as seen below on my test machine. The text file is created just as I would expect, the correct branch of the if statement is executed and the correct value is passed to parameter “Baud” and written to the registry.
When I try with the same action script on the 9.5.3.211 console or with the corresponding filxlet debugger I get the same results, and the action says that it creates the registry key but nothing is actually created.
What is really odd though is that if the if statement resolves to the Elseif setting the
parameter "Baud" = "No COM8 Device Found"
then the regset works just fine.
If anyone could send some wisdom my way on why/how this is not working now on the newer versions of BigFix that would be amazing.
Thanks in advance.