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

[Activate]
Registry=true

[RegistryKeys]
FreeDownloadManager=HKCU\Software\Softdeluxe\Free Download Manager
-=HKCU\SOFTWARE\Classes\fdm
-=HKCU\SOFTWARE\Google\Chrome\NativeMessagingHosts\org.freedownloadmanager.fdm5.cnh
-=HKCU\SOFTWARE\Mozilla\NativeMessagingHosts\org.freedownloadmanager.fdm5.cnh

[RegistryCleanupIfEmpty]
1=HKCU\Software\QtProject\OrganizationDefaults
2=HKCU\Software\QtProject
3=HKCU\Software\Softdeluxe
4=HKCU\SOFTWARE\Google\Chrome\NativeMessagingHosts
5=HKCU\SOFTWARE\Google\Chrome
6=HKCU\SOFTWARE\Google
7=HKCU\SOFTWARE\Mozilla\NativeMessagingHosts
8=HKCU\SOFTWARE\Mozilla

[DirectoriesMove]
portabledata=%PAL:AppDir%\FreeDownloadManager\portabledata
localdata=%LOCALAPPDATA%\Softdeluxe\Free Download Manager
;Downloads=%PAL:AppDir%\FreeDownloadManager\Downloads

[DirectoriesCleanupIfEmpty]
1=%LOCALAPPDATA%\Softdeluxe

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

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

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

[FileWrite4]
Type=Replace
File=%PAL:DataDir%\portabledata\settings.ini
Find=@PLACEHOLDER-DEFAULT-DOWNLOADS-FORWARDSLASH@
Replace=%PAL:AppDir:ForwardSlash%/FreeDownloadManager/Downloads
