One option we have is to make the relevance of the fixlet such that it is only not-relevant if the application is actually installed. Uninstall Keys are normally added at the very end of the installation and so using a registry check is often a great way to find out if something is installed. This will work much better than exit codes.
To answer your question:
You have a couple options – if you use “exit #” in an action but not on the last line of the action, the action will show as failed. You can do:
if {exit code of action != 0 and exit code of action != 3010}
exit {exit code of action}
endif
You can fail the action with continue if:
continue if {exit code of action = 0 or exit code of action != 3010}
You’d put them right after the place you ran the external process to check its return item. The action would then be able to fail if the process did not terminate with the right exit code.
You might also want to flag the action as pending restart in case of 3010…
continue if {exit code of action = 0 or exit code of action = 3010}
if {exit code of action = 3010}
action requires restart "reboot_for_my_package"
endif
That will leave the Action with the status “Pending Restart” instead of “Fixed” until the reboot occurs.
if {not exists keys whose (value “DisplayName” of it as string starts with “Microsoft Visual C++ 2015-2022 Redistributable (x64)” AND value “DisplayVersion” of it as string >= “11.12.14423.0”) of keys “HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall” of ( x64 registries; x32 registries )}
prefetch 20068efb77ea99b972ca4d0f87b93ec9fdcea7e4 sha1:20068efb77ea99b972ca4d0f87b93ec9fdcea7e4 size:25389860 http://bfroot.com:52311/Uploads/20068efb77ea99b972ca4d0f87b93ec9fdcea7e4/VC_redist.x64.exe.tmp sha256:a2908bb5a2d63eed3f99ef1cda3e771b484caa9da3dbfee8324685f8af6ad68d
extract 20068efb77ea99b972ca4d0f87b93ec9fdcea7e4
waithidden __Download\VC_redist.x64.exe /quiet /noreboot
endif
continue if {exit code of action = 0 or exit code of action = 3010}
if {exit code of action = 3010}
action requires restart “Microsoft Visual C++”
endif
The above action failes at the condition " if {exit code of action = 3010} " …
Please help me to change the logic to manage the 3010 code error