Hi All
We have 4 different version of a particular application on Windows 2008~2019 Servers that I need to uninstall via a single fixlet that then needs to be added to a baseline for our patching guys to run with.
Was thinking I could use elseif to step through the possible registry values in my action script so I could specify the required uninstall key as per this doco;
https://developer.bigfix.com/action-script/reference/flow-control/if-elseif-else-endif.html
I seem to be missing the mark here. Anyone able to provide feedback on what section(s) I’m going wrong here?
if {exists key “HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall{MyKey1}” of registry}
delete __createfile
createfile until END
MsiExec /X{{MyKey1} /qn REBOOT=reallysuppressEND
delete uninstall.bat
move __createfile uninstall.bat
waithidden uninstall.batelseif {exists key “HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall{MyKey2}” of registry}
delete __createfile
createfile until END
MsiExec /X{{MyKey2} /qn REBOOT=reallysuppressEND
delete uninstall.bat
move __createfile uninstall.bat
waithidden uninstall.batelseif {exists key “HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall{MyKey3}” of registry
delete __createfile
createfile until END
MsiExec /X{{MyKey3} /qn REBOOT=reallysuppressEND
delete uninstall.bat
move __createfile uninstall.bat
waithidden uninstall.batelseif {exists key “HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall{MyKey4}” of registry
delete __createfile
createfile until END
MsiExec /X{{MyKey4} /qn REBOOT=reallysuppressEND
delete uninstall.bat
move __createfile uninstall.bat
waithidden uninstall.batendif
action requires restart “CrapApp_Uninstalled”