[Launch]
ProgramExecutable=Transmission\transmission-qt.exe
CommandLineArguments='--config-dir "%PAL:DataDir%\transmission-settings"'
DirectoryMoveOK=yes
SupportsUNC=yes
MinOS=7

[Activate]
Registry=true

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

[RegistryCleanupIfEmpty]
1=HKCU\Software\Trolltech\OrganizationDefaults\Qt
2=HKCU\Software\Trolltech\OrganizationDefaults
3=HKCU\Software\Trolltech

[DirectoriesCleanupIfEmpty]
1=%ALLUSERSAPPDATA%\Transmission

[FileWrite1]
Type=Replace
File=%PAL:DataDir%\transmission-settings\settings.json
Find=DEFAULTPORTABLEAPPSDOCUMENTS
Replace=%PortableApps.comDocuments:ForwardSlash%

[FileWrite2]
Type=Replace
File=%PAL:DataDir%\transmission-settings\settings.json
Find=DEFAULTAPPDATADIRECTORY
Replace=%PAL:DataDir:ForwardSlash%

[FileWrite3]
Type=Replace
File=%PAL:DataDir%\transmission-settings\settings.json
Find=%PAL:LastDrive%%PAL:LastPackagePartialDir:ForwardSlash%/
Replace=%PAL:Drive%%PAL:PackagePartialDir:ForwardSlash%/

[FileWrite4]
Type=Replace
File=%PAL:DataDir%\transmission-settings\settings.json
Find=%PAL:LastPortableAppsBaseDir:ForwardSlash%/
Replace=%PAL:PortableAppsBaseDir:ForwardSlash%/

[FileWrite5]
Type=Replace
File=%PAL:DataDir%\transmission-settings\settings.json
Find=%PAL:LastDrive%/
Replace=%PAL:Drive%/