[Launch]
ProgramExecutable=qBittorrent\qbittorrent.exe
DirectoryMoveOK=yes
SupportsUNC=yes
;Next line is required for qBittorrent to handle launching second instances
CleanTemp=false

[FileWrite1]
Type=Replace
File=%PAL:DataDir%\settings\AppData_qBittorrent\qBittorrent.ini
Find=THISSTRINGWILLBEREPLACEDBYDATADIR
Replace=%PAL:DataDir:ForwardSlash%

[FileWrite2]
Type=Replace
File=%PAL:DataDir%\settings\AppData_qBittorrent\qBittorrent.ini
Find=%PAL:LastDrive%%PAL:LastPackagePartialDir:ForwardSlash%
Replace=%PAL:Drive%%PAL:PackagePartialDir:ForwardSlash%

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

[FileWrite4]
Type=INI
File=%PAL:DataDir%\settings\AppData_qBittorrent\qBittorrent.ini
Section=Preferences
Key=General\Locale
Value=%PAL:LanguageCustom%

[FileWrite5]
Type=Replace
File=%PAL:DataDir%\settings\AppData_qBittorrent\qBittorrent-resume.ini
Find=\x%PAL:LastDriveHex%\0:\
Replace=\x%PAL:DriveHex%\0:\

[FileWrite6]
Type=INI
File=%PAL:DataDir%\settings\AppData_qBittorrent\qBittorrent.ini
Section=Preferences
Key=Win32\NeverCheckFileAssociation
Value=true

[Activate]
Registry=true

[RegistryKeys]
qBitTorrent="HKCU\Software\qBittorrent"
Classes_torrent="HKLM\SOFTWARE\Classes\.torrent"
Classes_Magnet="HKLM\SOFTWARE\Classes\Magnet"
Classes_qBittorrent="HKLM\SOFTWARE\Classes\qBittorrent"
ESENT_qBittorrent="HKLM\SOFTWARE\Microsoft\ESENT\Process\qbittorrent"

[DirectoriesMove]
settings\LocalAppData_qBittorrent=%LOCALAPPDATA%\qBittorrent
settings\AppData_qBittorrent=%APPDATA%\qBittorrent

[Language]
Base=%PortableApps.comLocaleglibc%
CheckIfExists=%PAL:AppDir%\qBittorrent\translations\qt_%PAL:LanguageCustom%.qm
DefaultIfNotExists=en_US

[LanguageFile]
Type=INI
File=%PAL:DataDir%\settings\AppData_qBittorrent\qBittorrent.ini
Section=Preferences
Key=General\Locale