[Launch]
ProgramExecutable=KeePassXC\KeePassXC.exe
WorkingDirectory=%PAL:AppDir%\KeePassXC
DirectoryMoveOK=yes
SupportsUNC=yes
MinOS=7

[Activate]
Registry=true

[RegistryKeys]
-=HKCU\Software\QtProject\OrganizationDefaults\FileDialog

[RegistryCleanupIfEmpty]
1=HKCU\Software\QtProject\OrganizationDefaults
2=HKCU\Software\QtProject

[FilesMove]
settings\keepassxc.ini=%PAL:AppDir%\KeePassXC\config
settings\keepassxc_local.ini=%PAL:AppDir%\KeePassXC\config

[FileWrite1]
Type=Replace
File=%PAL:DataDir%\settings\keepassxc.ini
Find=%PAL:LastDrive%%PAL:LastPackagePartialDir:ForwardSlash%/
Replace=%PAL:Drive%%PAL:PackagePartialDir:ForwardSlash%/

[FileWrite2]
Type=Replace
File=%PAL:DataDir%\settings\keepassxc.ini
Find=%PAL:LastPortableAppsBaseDir:ForwardSlash%/
Replace=%PAL:PortableAppsBaseDir:ForwardSlash%/

[FileWrite3]
Type=Replace
File=%PAL:DataDir%\settings\keepassxc.ini
Find=%PAL:LastDrive%/
Replace=%PAL:Drive%/

[FileWrite4]
Type=Replace
File=%PAL:DataDir%\settings\keepassxc_local.ini
Find=%PAL:LastDrive%%PAL:LastPackagePartialDir:DoubleBackSlash%\\
Replace=%PAL:Drive%%PAL:PackagePartialDir:DoubleBackSlash%\\

[FileWrite5]
Type=Replace
File=%PAL:DataDir%\settings\keepassxc_local.ini
Find=%PAL:LastPortableAppsBaseDir:DoubleBackSlash%\\
Replace=%PAL:PortableAppsBaseDir:DoubleBackSlash%\\

[FileWrite6]
Type=Replace
File=%PAL:DataDir%\settings\keepassxc_local.ini
Find=%PAL:LastDrive%\\
Replace=%PAL:Drive%\\

[FileWrite7]
Type=Replace
File=%PAL:DataDir%\settings\keepassxc_local.ini
Find=INITIALDOCUMENTSDIRECTORYREPLACEME
Replace=%PortableApps.comDocuments:ForwardSlash%/
