[Launch]
ProgramExecutable=KchmViewer\kchmviewer.exe
DirectoryMoveOK=yes
SupportsUNC=yes

[Activate]
Registry=true

[RegistryKeys]
kchmviewer_portable=HKCU\Software\Ulduzsoft\kchmviewer

[RegistryCleanupIfEmpty]
1=HKCU\Software\Ulduzsoft

[QtKeysCleanup]
1=Qt Factory Cache 4.8\com.trolltech.Qt.QIconEngineFactoryInterface:
2=Qt Factory Cache 4.8\com.trolltech.Qt.QIconEngineFactoryInterfaceV2:
3=Qt Factory Cache 4.8\com.trolltech.Qt.QImageIOHandlerFactoryInterface:
4=Qt Plugin Cache 4.8.false
5=Qt Factory Cache 4.8\com.trolltech.Qt.QTextCodecFactoryInterface:

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

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

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

[FileWrite4]
Type=INI
File=%PAL:DataDir%\settings\KchmViewerPortableSettings.ini
Section=KchmViewerPortableSettings
Key=Language
Value=%PAL:LanguageCustom%

[DirectoriesMove]
.kchmviewer=%USERPROFILE%\.kchmviewer

[Language]
Base=%PortableApps.comLocaleglibc%

[LanguageFile]
Type=INI
File=PAL:DataDir%\settings\KchmViewerPortable.ini
Section=KchmViewerPortableSettings
Key=Language