Here is what I did to install and uninstall.
At first I also got "Return Value 1631" and spent a lot of time with UAC security, privilege escalation, Impersonate = "yes" and Execute = "deferred", which did not work.
But in the end, it was fixed very simply when I set Directory = "TARGETDIR" and not BinaryKey = "WixCA"
<Product> ... <CustomAction Id="LaunchBrowserInstall" Directory="TARGETDIR" Execute="immediate" Impersonate="yes" Return="asyncNoWait" ExeCommand="explorer.exe https://www.example.com/post_install/" /> <CustomAction Id="LaunchBrowserUninstall" Directory="TARGETDIR" Execute="immediate" Impersonate="yes" Return="asyncNoWait" ExeCommand="explorer.exe https://www.example.com/post_uninstall/" /> <InstallExecuteSequence> <Custom Action="LaunchBrowserInstall" After="InstallFinalize">NOT Installed AND NOT REMOVE</Custom> <Custom Action="LaunchBrowserUninstall" After="InstallFinalize">REMOVE ~= "ALL"</Custom> </InstallExecuteSequence> ... </Product>
source share