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

[Activate]
Registry=true

[RegistryKeys]
GTKFileChooser=HKCU\Software\GSettings\org\gtk\settings\file-chooser

[RegistryCleanupIfEmpty]
1=HKCU\Software\GSettings\org\gtk\settings
2=HKCU\Software\GSettings\org\gtk
3=HKCU\Software\GSettings\org
4=HKCU\Software\GSettings

[DirectoriesMove]
HomeBankConfig=%PAL:AppDir%\HomeBank\config

[FilesMove]
recently-used.xbel=%LOCALAPPDATA%

[DirectoriesCleanupIfEmpty]
1=%LOCALAPPDATA%\gtk-3.0

[FileWrite1]
Type=Replace
File=%PAL:DataDir%\HomeBankConfig\preferences
Find=%PAL:LastDrive%%PAL:LastPackagePartialDir:DoubleBackslash%\\
Replace=%PAL:Drive%%PAL:PackagePartialDir:DoubleBackslash%\\

[FileWrite2]
Type=Replace
File=%PAL:DataDir%\HomeBankConfig\preferences
Find=%PAL:LastDrive%%PAL:LastPortableAppsBaseDir:DoubleBackslash%\\
Replace=%PAL:Drive%%PAL:PortableAppsBaseDir:DoubleBackslash%\\

[FileWrite3]
Type=Replace
File=%PAL:DataDir%\HomeBankConfig\preferences
Find=%PAL:LastDrive%\\
Replace=%PAL:Drive%\\

[FileWrite4]
Type=Replace
File=%PAL:DataDir%\HomeBankConfig\preferences
Find=@PLACEHOLDER_DATADIRECTORY@
Replace=%PAL:DataDir:DoubleBackslash%

[FileWrite5]
Type=Replace
File=%PAL:DataDir%\recently-used.xbel
Find=file:///%PAL:LastDrive%%PAL:LastPackagePartialDir:ForwardSlash%/
Replace=file:///%PAL:Drive%%PAL:PackagePartialDir:ForwardSlash%/

[FileWrite6]
Type=Replace
File=%PAL:DataDir%\recently-used.xbel
Find=file:///%PAL:LastPortableAppsBaseDir:ForwardSlash%/
Replace=file:///%PAL:LastPortableAppsBaseDir:ForwardSlash%/

[FileWrite7]
Type=Replace
File=%PAL:DataDir%\recently-used.xbel
Find=file:///%PAL:LastDrive%/
Replace=file:///%PAL:Drive%/
