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

[Activate]
Registry=true

[RegistryKeys]
Lagrange=HKCU\Software\Jaakko Keränen\Lagrange

[RegistryCleanupIfEmpty]
1=HKCU\Software\Jaakko Keränen

[DirectoriesMove]
userdata=%PAL:AppDir%\Lagrange\userdata

[FileWrite1]
Type=Replace
File=%PAL:DataDir%\userdata\prefs.cfg
Find=$DEFAULTDOWNLOADSPATH$
Replace=%PAL:DataDir:ForwardSlash%/downloads

[FileWrite2]
Type=Replace
File=%PAL:DataDir%\userdata\prefs.cfg
Find=%PAL:LastDrive%%PAL:LastPackagePartialDir:ForwardSlash%/
Replace=%PAL:Drive%%PAL:PackagePartialDir:ForwardSlash%/

[FileWrite3]
Type=Replace
File=%PAL:DataDir%\userdata\prefs.cfg
Find=%PAL:LastDrive%%PAL:LastPortableAppsBaseDir:ForwardSlash%/
Replace=%PAL:Drive%%PAL:PortableAppsBaseDir:ForwardSlash%/

[FileWrite4]
Type=Replace
File=%PAL:DataDir%\userdata\prefs.cfg
Find=%PAL:LastDrive%/
Replace=%PAL:Drive%/

[FileWrite5]
Type=Replace
File=%PAL:DataDir%\userdata\bookmarks.ini
Find=file:///%PAL:LastDrive%%PAL:LastPackagePartialDir:ForwardSlash%/
Replace=file:///%PAL:Drive%%PAL:PackagePartialDir:ForwardSlash%/

[FileWrite6]
Type=Replace
File=%PAL:DataDir%\userdata\bookmarks.ini
Find=file:///%PAL:LastDrive%%PAL:LastPortableAppsBaseDir:ForwardSlash%/
Replace=file:///%PAL:Drive%%PAL:PortableAppsBaseDir:ForwardSlash%/

[FileWrite7]
Type=Replace
File=%PAL:DataDir%\userdata\bookmarks.ini
Find=file:///%PAL:LastDrive%/
Replace=file:///%PAL:Drive%/
