Unregister engine on uninstall (#7594)

Signed-off-by: Alex Peterson <26804013+AMZN-alexpete@users.noreply.github.com>
This commit is contained in:
Alex Peterson
2022-02-14 09:28:36 -08:00
committed by GitHub
parent 5dd88ba05c
commit c2c8fb5b9a
3 changed files with 19 additions and 4 deletions
@@ -36,6 +36,7 @@
<Directory Id="root.cmake.runtime" Name="runtime"/>
</Directory>
<Directory Id="root.python" Name="python"/>
<Directory Id="root.scripts" Name="scripts"/>
<Directory Id="root.tools" Name="Tools">
<Directory Id="root.tools.redist" Name="Redistributables">
<Directory Id="root.tools.redist.cmake" Name="CMake"/>
@@ -61,5 +62,12 @@
Execute="deferred"
Impersonate="no"/>
<CustomAction Id="UnRegisterEngine"
ExeCommand="&quot;[SystemFolder]cmd.exe&quot; /C @&quot;[root.scripts]o3de.bat&quot; register --remove --this-engine"
Directory="INSTALL_ROOT"
Execute="immediate"
Return="ignore"
Impersonate="no"/>
</Fragment>
</Wix>
@@ -58,6 +58,10 @@
<Custom Action="ConfigurePython" After="MoveCMake">
NOT Installed Or REINSTALL
</Custom>
<!-- limit the unregister action to full uninstall -->
<Custom Action="UnRegisterEngine" After="InstallInitialize">
(NOT UPGRADINGPRODUCTCODE) AND (REMOVE="ALL")
</Custom>
</InstallExecuteSequence>
<UIRef Id="$(var.CPACK_WIX_UI_REF)" />