2017-10-30 10:41:20 -04:00
<?xml version="1.0" encoding="UTF-8"?>
<?include "cpack_variables.wxi"?>
<Wix xmlns= "http://schemas.microsoft.com/wix/2006/wi"
2018-02-24 02:59:49 -05:00
xmlns:util="http://schemas.microsoft.com/wix/UtilExtension"
2017-10-30 10:41:20 -04:00
RequiredVersion="3.6.3303.0">
<Product Id= "$(var.CPACK_WIX_PRODUCT_GUID)"
Name="$(var.CPACK_PACKAGE_NAME)"
Language="1033"
Version="$(var.CPACK_PACKAGE_VERSION)"
Manufacturer="$(var.CPACK_PACKAGE_VENDOR)"
UpgradeCode="$(var.CPACK_WIX_UPGRADE_GUID)">
<Package InstallScope= "perMachine" InstallerVersion= "301" Compressed= "yes" />
<Media Id= "1" Cabinet= "media1.cab" EmbedCab= "yes" />
<MajorUpgrade
Schedule="afterInstallInitialize"
AllowSameVersionUpgrades="yes"
DowngradeErrorMessage="A later version of [ProductName] is already installed. Setup will now exit."/>
<WixVariable Id= "WixUILicenseRtf" Value= "$(var.CPACK_WIX_LICENSE_RTF)" />
<Property Id= "WIXUI_INSTALLDIR" Value= "INSTALL_ROOT" />
<?ifdef CPACK_WIX_PRODUCT_ICON?>
<Property Id= "ARPPRODUCTICON" > ProductIcon.ico</Property>
<Icon Id= "ProductIcon.ico" SourceFile= "$(var.CPACK_WIX_PRODUCT_ICON)" />
<?endif?>
<?ifdef CPACK_WIX_UI_BANNER?>
<WixVariable Id= "WixUIBannerBmp" Value= "$(var.CPACK_WIX_UI_BANNER)" />
<?endif?>
<?ifdef CPACK_WIX_UI_DIALOG?>
<WixVariable Id= "WixUIDialogBmp" Value= "$(var.CPACK_WIX_UI_DIALOG)" />
<?endif?>
2019-06-29 18:34:19 -04:00
<UI >
<UIRef Id= "$(var.CPACK_WIX_UI_REF)" />
2020-05-05 21:47:26 -04:00
<Publish Dialog= "KPXC_ExitDialog" Control= "Finish" Order= "1" Event= "DoAction" Value= "LaunchApplication" > LAUNCHAPPONEXIT</Publish>
2019-06-29 18:34:19 -04:00
</UI>
2017-10-30 10:41:20 -04:00
<?include "properties.wxi"?>
<?include "product_fragment.wxi"?>
2020-05-05 21:47:26 -04:00
<!-- Autostart via registry (optional) -->
<Component Id= "Autostart" Guid= "*" Directory= "INSTALL_ROOT" >
<RegistryValue Id= "Autostart.rst" Root= "HKCU" Action= "write"
Key="Software\Microsoft\Windows\CurrentVersion\Run"
Name="$(var.CPACK_PACKAGE_NAME)"
2020-06-17 17:58:24 -04:00
Value="" [#CM_FP_KeePassXC.exe]" "
2020-05-05 21:47:26 -04:00
Type="string" />
<Condition > AUTOSTARTPROGRAM</Condition>
</Component>
2017-10-30 10:41:20 -04:00
<DirectoryRef Id= "TARGETDIR" >
2021-06-13 22:29:55 -04:00
<!-- Startmenu shortcuts -->
2019-06-29 18:34:19 -04:00
<Directory Id= "ProgramMenuFolder" >
2020-05-05 21:47:26 -04:00
<Directory Id= "ApplicationProgramsFolder" Name= "KeePassXC" >
2021-06-13 22:29:55 -04:00
<Component Id= "ApplicationShortcuts" Guid= "*" >
2021-09-21 00:17:46 -04:00
<Shortcut Id= "ApplicationStartMenuShortcut"
2020-05-05 21:47:26 -04:00
Name="KeePassXC"
Target="[#CM_FP_KeePassXC.exe]"
WorkingDirectory="INSTALL_ROOT"/>
2021-06-13 22:29:55 -04:00
<Shortcut Id= "GettingStartedShortcut"
Name="KeePassXC - Getting Started"
Target="[#CM_FP_share.docs.KeePassXC_GettingStarted.html]"
WorkingDirectory="INSTALL_ROOT" />
<Shortcut Id= "UserGuideShortcut"
Name="KeePassXC - User Guide"
Target="[#CM_FP_share.docs.KeePassXC_UserGuide.html]"
WorkingDirectory="INSTALL_ROOT" />
<RemoveFolder Id= "ApplicationProgramsFolder" On= "uninstall" />
<RegistryValue Root= "HKCU" Key= "Software\KeePassXC" Name= "StartMenuShortcut" Type= "integer" Value= "1" KeyPath= "yes" />
2020-05-05 21:47:26 -04:00
</Component>
</Directory>
2019-06-29 18:34:19 -04:00
</Directory>
2018-02-24 02:59:49 -05:00
2020-05-05 21:47:26 -04:00
<!-- Desktop shortcut (optional) -->
<Directory Id= "DesktopFolder" Name= "Desktop" >
<Component Id= "DesktopShortcut" Guid= "F8AFBA1C-296C-41AA-B968-60323A206665" >
<Condition > INSTALLDESKTOPSHORTCUT</Condition>
<Shortcut Id= "ApplicationDesktopShortcut"
Directory="DesktopFolder"
Name="KeePassXC"
Target="[#CM_FP_KeePassXC.exe]"
WorkingDirectory="INSTALL_ROOT" />
2021-06-13 22:29:55 -04:00
<RemoveFile Id= "RemoveDesktopIcon" Name= "KeePassXC.lnk" On= "uninstall" />
2020-05-05 21:47:26 -04:00
<RegistryValue Root= "HKCU" Key= "Software\KeePassXC" Name= "DesktopShortcut" Type= "integer" Value= "1" KeyPath= "yes" />
</Component>
</Directory>
2023-10-23 23:23:20 -04:00
<!-- Windows system folder -->
<Directory Id= "SystemFolder" Name= "SystemFolder" />
2019-06-29 18:34:19 -04:00
</DirectoryRef>
2021-06-13 22:29:55 -04:00
<!-- Custom properties to control installation options -->
2021-02-12 21:11:42 -05:00
<Property Id= "LAUNCHAPPONEXIT" Value= "1" Secure= "yes" />
2021-06-13 22:29:55 -04:00
<Property Id= "AUTOSTARTPROGRAM" Value= "1" Secure= "yes" />
<Property Id= "AUTOSTARTPROGRAM_REGISTRY" >
<RegistrySearch Id= "AutoStartSearch" Root= "HKCU" Key= "Software\Microsoft\Windows\CurrentVersion\Run" Name= "$(var.CPACK_PACKAGE_NAME)" Type= "raw" />
</Property>
2021-02-12 21:11:42 -05:00
<Property Id= "INSTALLDESKTOPSHORTCUT" Secure= "yes" />
2021-06-13 22:29:55 -04:00
<!-- Set properties based on existing conditions, prevents changing state on upgrade -->
<SetProperty Id= "AUTOSTARTPROGRAM" After= "AppSearch" Value= "" > AUTOSTARTPROGRAM="0" OR (WIX_UPGRADE_DETECTED AND NOT AUTOSTARTPROGRAM_REGISTRY)</SetProperty>
<SetProperty Id= "LicenseAccepted" After= "AppSearch" Value= "1" > WIX_UPGRADE_DETECTED</SetProperty>
2020-05-05 21:47:26 -04:00
<FeatureRef Id= "ProductFeature" >
2021-06-13 22:29:55 -04:00
<ComponentRef Id= "ApplicationShortcuts" />
2020-05-05 21:47:26 -04:00
<ComponentRef Id= "Autostart" />
<ComponentRef Id= "DesktopShortcut" />
</FeatureRef>
2021-06-13 22:29:55 -04:00
<!-- Action to launch application after installer exits -->
2019-06-29 18:34:19 -04:00
<Property Id= "WixShellExecTarget" Value= "[#CM_FP_KeePassXC.exe]" />
<CustomAction Id= "LaunchApplication" BinaryKey= "WixCA" DllEntry= "WixShellExec" Impersonate= "yes" />
2023-10-23 23:23:20 -04:00
<!-- 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" />
2018-02-24 02:59:49 -05:00
<InstallExecuteSequence >
2020-05-05 21:47:26 -04:00
<Custom Action= "KillKeePassXC" Before= "InstallValidate" />
2023-10-23 23:23:20 -04:00
<Custom Action= "KillKeePassXCProxy" Before= "InstallValidate" />
2021-06-13 22:29:55 -04:00
<!-- Prevent pinned taskbar shortcut from being removed -->
<RemoveShortcuts Suppress= "yes" />
2018-02-24 02:59:49 -05:00
</InstallExecuteSequence>
2017-10-30 10:41:20 -04:00
</Product>
</Wix>