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 Jan 30, 2024
1 parent c6e66fc commit f8311f9
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 f8311f9

Please sign in to comment.