Skip to content

Commit

Permalink
Fix terminating KeePassXC processes with MSI installer (#9822)
Browse files Browse the repository at this point in the history
  • Loading branch information
varjolintu authored and droidmonkey committed Feb 4, 2024
1 parent c9b0cba commit e6d2e5f
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions share/windows/wix-template.xml
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,9 @@
<RegistryValue Root="HKCU" Key="Software\KeePassXC" Name="DesktopShortcut" Type="integer" Value="1" KeyPath="yes"/>
</Component>
</Directory>

<!-- Windows system folder -->
<Directory Id="SystemFolder" Name="SystemFolder" />
</DirectoryRef>

<!-- Custom properties to control installation options -->
Expand All @@ -116,12 +119,17 @@
<Property Id="WixShellExecTarget" Value="[#CM_FP_KeePassXC.exe]" />
<CustomAction Id="LaunchApplication" BinaryKey="WixCA" DllEntry="WixShellExec" Impersonate="yes" />

<!-- Action to kill running KeePassXC processes -->
<Property Id="WixSilentExecCmdLine" Value='taskkill /IM KeePassXC.exe; taskkill /IM keepassxc-proxy.exe /F' />
<CustomAction Id="KillKeePassXC" BinaryKey="WixCA" DllEntry="WixSilentExec" Execute="immediate" Return="ignore" />
<!-- Action to kill running KeePassXC process -->
<Property Id="WixQuietExecCmdLine" Value='"[SystemFolder]taskkill.exe" /IM KeePassXC.exe' />
<CustomAction Id="KillKeePassXC" BinaryKey="WixCA" DllEntry="WixQuietExec" Execute="immediate" Return="ignore" />

<!-- Action to kill running keepassxc-proxy processes -->
<Property Id="WixSilentExecCmdLine" Value='"[SystemFolder]taskkill.exe" /IM keepassxc-proxy.exe /F' />
<CustomAction Id="KillKeePassXCProxy" BinaryKey="WixCA" DllEntry="WixSilentExec" Execute="immediate" Return="ignore" />

<InstallExecuteSequence>
<Custom Action="KillKeePassXC" Before="InstallValidate" />
<Custom Action="KillKeePassXCProxy" Before="InstallValidate" />
<!-- Prevent pinned taskbar shortcut from being removed -->
<RemoveShortcuts Suppress="yes" />
</InstallExecuteSequence>
Expand Down

0 comments on commit e6d2e5f

Please sign in to comment.