Fix terminating KeePassXC processes with MSI installer (#9822)

This commit is contained in:
Sami Vänttinen 2023-10-24 06:23:20 +03:00 committed by GitHub
parent 6f5f600559
commit 029b4c25ac
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -92,6 +92,9 @@
<RegistryValue Root="HKCU" Key="Software\KeePassXC" Name="DesktopShortcut" Type="integer" Value="1" KeyPath="yes"/> <RegistryValue Root="HKCU" Key="Software\KeePassXC" Name="DesktopShortcut" Type="integer" Value="1" KeyPath="yes"/>
</Component> </Component>
</Directory> </Directory>
<!-- Windows system folder -->
<Directory Id="SystemFolder" Name="SystemFolder" />
</DirectoryRef> </DirectoryRef>
<!-- Custom properties to control installation options --> <!-- Custom properties to control installation options -->
@ -116,12 +119,17 @@
<Property Id="WixShellExecTarget" Value="[#CM_FP_KeePassXC.exe]" /> <Property Id="WixShellExecTarget" Value="[#CM_FP_KeePassXC.exe]" />
<CustomAction Id="LaunchApplication" BinaryKey="WixCA" DllEntry="WixShellExec" Impersonate="yes" /> <CustomAction Id="LaunchApplication" BinaryKey="WixCA" DllEntry="WixShellExec" Impersonate="yes" />
<!-- Action to kill running KeePassXC processes --> <!-- Action to kill running KeePassXC process -->
<Property Id="WixSilentExecCmdLine" Value='taskkill /IM KeePassXC.exe; taskkill /IM keepassxc-proxy.exe /F' /> <Property Id="WixQuietExecCmdLine" Value='"[SystemFolder]taskkill.exe" /IM KeePassXC.exe' />
<CustomAction Id="KillKeePassXC" BinaryKey="WixCA" DllEntry="WixSilentExec" Execute="immediate" Return="ignore" /> <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> <InstallExecuteSequence>
<Custom Action="KillKeePassXC" Before="InstallValidate" /> <Custom Action="KillKeePassXC" Before="InstallValidate" />
<Custom Action="KillKeePassXCProxy" Before="InstallValidate" />
<!-- Prevent pinned taskbar shortcut from being removed --> <!-- Prevent pinned taskbar shortcut from being removed -->
<RemoveShortcuts Suppress="yes" /> <RemoveShortcuts Suppress="yes" />
</InstallExecuteSequence> </InstallExecuteSequence>