[Launch]
ProgramExecutable=CCleaner\CCleaner.exe
ProgramExecutable64=CCleaner\CCleaner64.exe
WorkingDirectory=%PAL:AppDir%\CCleaner
DirectoryMoveOK=yes
SupportsUNC=yes
RunAsAdmin=compile-force
CleanTemp=false

[Activate]
Registry=true

[RegistryKeys]
CCleaner=HKCU\Software\Piriform\CCleaner
CCleanerHKLM=HKLM\Software\Piriform\CCleaner

[RegistryCleanupIfEmpty]
1=HKCU\Software\Piriform
2=HKLM\Software\Piriform

[DirectoriesMove]
CCleanerData=%PAL:AppDir%\CCleaner\DATA
CCleanerLogs=%PAL:AppDir%\CCleaner\LOG

[FilesMove]
ccleaner.ini=%PAL:AppDir%\CCleaner

[FileWrite1]
Type=Replace
File=%PAL:DataDir%\ccleaner.ini
Find=%PAL:LastDrive%%PAL:LastPackagePartialDir%\
Replace=%PAL:Drive%%PAL:PackagePartialDir%\

[FileWrite2]
Type=Replace
File=%PAL:DataDir%\ccleaner.ini
Find=%PAL:LastDrive%%PAL:LastPortableAppsBaseDir%\
Replace=%PAL:Drive%%PAL:PortableAppsBaseDir%\

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

[FileWrite4]
Type=INI
File=%PAL:DataDir%\settings\CCleanerHKLM.reg
Section=HKEY_LOCAL_MACHINE\SOFTWARE\Piriform\CCleaner
Key=@
Value='"%PAL:AppDir:DoubleBackslash%\\CCleaner"'

[FileWrite5]
Type=INI
File=%PAL:DataDir%\settings\CCleanerHKLM.reg
Section=HKEY_LOCAL_MACHINE\SOFTWARE\Piriform\CCleaner
Key='"ProgramFolder"'
Value='"%PAL:AppDir:DoubleBackslash%\\CCleaner"'

[FileWrite6]
Type=INI
File=%PAL:DataDir%\settings\CCleanerHKLM.reg
Section=HKEY_LOCAL_MACHINE\SOFTWARE\Piriform\CCleaner
Key='"DataFolder"'
Value='"%PAL:AppDir:DoubleBackslash%\\CCleaner"'
