summaryrefslogtreecommitdiff
path: root/contrib/msi
diff options
context:
space:
mode:
authorJason T. Greene <jason.greene@redhat.com>2021-12-14 01:38:16 -0600
committerJason T. Greene <jason.greene@redhat.com>2021-12-23 00:29:10 -0600
commit3ac5999f8590991bd24810d8cbe829de92442638 (patch)
tree3d3208e0d6b83b1e05e0664f523c27e0efd0adf1 /contrib/msi
parent74a58faf2a54a9a063efc69371af7d81d335ba21 (diff)
downloadpodman-3ac5999f8590991bd24810d8cbe829de92442638.tar.gz
podman-3ac5999f8590991bd24810d8cbe829de92442638.tar.bz2
podman-3ac5999f8590991bd24810d8cbe829de92442638.zip
Switch to a new installer approach using a path manipulation helper
Fixes #11089 - cleanup PATH on MSI uninstall Additionally fixes scenarios where the path can be overwritten by setx Also removes the console flash, since the helper is built as a silent gui Helper executable can be rerun by user to repair PATHs broken by other tools Utilizes executable location instead of passed parameters to remove delicate escaping requirements [NO NEW TESTS NEEDED] Signed-off-by: Jason T. Greene <jason.greene@redhat.com>
Diffstat (limited to 'contrib/msi')
-rw-r--r--contrib/msi/podman.wxs12
1 files changed, 8 insertions, 4 deletions
diff --git a/contrib/msi/podman.wxs b/contrib/msi/podman.wxs
index aade2afdb..c1b8f1a23 100644
--- a/contrib/msi/podman.wxs
+++ b/contrib/msi/podman.wxs
@@ -26,18 +26,21 @@
<Component Id="MainExecutable" Guid="73752F94-6589-4C7B-ABED-39D655A19714" Win64="Yes">
<File Id="520C6E17-77A2-4F41-9611-30FA763A0702" Name="podman.exe" Source="bin/windows/podman.exe" KeyPath="yes"/>
</Component>
+ <Component Id="WinPathExecutable" Guid="00F5B731-D4A6-4B69-87B0-EA4EBAB89F95" Win64="Yes">
+ <File Id="8F507E28-A61D-4E64-A92B-B5A00F023AE8" Name="winpath.exe" Source="bin/windows/winpath.exe" KeyPath="yes"/>
+ </Component>
</Directory>
</Directory>
</Directory>
</Directory>
- <Property Id="setx" Value="setx.exe"/>
- <!-- Directory table entries have a trailing slash, so an extra backslash is needed to prevent escaping the quote -->
- <CustomAction Id="ChangePath" ExeCommand="PATH &quot;%PATH%;[INSTALLDIR]\&quot;" Property="setx" Execute="deferred" Impersonate="yes" Return="check"/>
+ <CustomAction Id="AddPath" ExeCommand="add" FileKey="8F507E28-A61D-4E64-A92B-B5A00F023AE8" Execute="deferred" Impersonate="yes" Return="check"/>
+ <CustomAction Id="RemovePath" ExeCommand="remove" FileKey="8F507E28-A61D-4E64-A92B-B5A00F023AE8" Execute="deferred" Impersonate="yes" Return="check"/>
<Feature Id="Complete" Level="1">
<ComponentRef Id="INSTALLDIR_Component"/>
<ComponentRef Id="MainExecutable"/>
+ <ComponentRef Id="WinPathExecutable"/>
<ComponentGroupRef Id="ManFiles"/>
</Feature>
@@ -46,7 +49,8 @@
<InstallExecuteSequence>
<RemoveExistingProducts Before="InstallInitialize"/>
- <Custom Action="ChangePath" After="InstallServices">NOT Installed</Custom>
+ <Custom Action="AddPath" After="InstallFiles">NOT Installed</Custom>
+ <Custom Action="RemovePath" Before="RemoveFiles" After="InstallInitiailize">(REMOVE="ALL") AND (NOT UPGRADINGPRODUCTCODE)</Custom>
</InstallExecuteSequence>
</Product>