[Setup]
AppName=browser

[FileToRun]
PathToExe=.\Browser\$AppName$.exe
Parameters=--user-data-dir="%Profile%" --no-default-browser-check --disable-component-update --disable-background-networking --allow-outdated-plugins --ppapi-flash-path="PepperFlash\pepflashplayer.dll" --ppapi-flash-version=32.0.0.371 --force-device-scale-factor=1 --enable-features=PasswordImport

[Environment]
Profile=.\User Data
Registry=%Profile%\Registry
 
[Functions]
DirCreate=%Profile%|%Registry%

[WriteToReg=%Registry%\$AppName$_1.reg]
MainKey=HKEY_CURRENT_USER\Software\CocCoc
[WriteToReg=%Registry%\$AppName$_2.reg]
MainKey=HKEY_LOCAL_MACHINE\SOFTWARE\CocCoc

[RunBefore]
RegEdit=%Registry%\$AppName$_1.reg;$AppName$_2.reg

[RunAfter]
DirRemove=$LocalAppData$\CrashDumps
FileDelete=$LocalAppData$\CocCoc\Browser\User Data\*.log
DirRemove=$LocalAppData$\CocCoc\Browser\User Data\Crashpad
DirRemove=$LocalAppData$\CocCoc\Browser\User Data\torrent
DirRemove=$LocalAppData$\CocCoc\Browser\User Data|e
DirRemove=$LocalAppData$\CocCoc\Browser|e
DirRemove=$LocalAppData$\CocCoc|e
DirRemove=C:\Program Files (x86)\CocCoc\CrashReports
DirRemove=C:\Program Files (x86)\CocCoc|e

FileDelete=@AppDataDir@\CocCoc\uid;hid*
DirRemove=@AppDataDir@\CocCoc|e

DirRemove=%Profile%\Caps
DirRemove=%Profile%\EVWhitelist
DirRemove=%Profile%\CertificateTransparency
DirRemove=%Profile%\FileTypePolicies
DirRemove=%Profile%\OriginTrials
DirRemove=%Profile%\WidevineCDM|e
DirRemove=%Profile%\Webstore Downloads|e
DirRemove=%Profile%\PepperFlash
DirRemove=%Profile%\pnacl|e
DirRemove=%Profile%\PnaclTranslationCache
DirRemove=%Profile%\Crashpad
DirRemove=%Profile%\ShaderCache
DirRemove=%Profile%\Safe Browsing
DirRemove=%Profile%\BrowserMetrics
DirRemove=%Profile%\GrShaderCache\GPUCache
DirRemove=%Profile%\GrShaderCache|e
FileDelete=%Profile%\*.tmp;*-journal*;chrome_shutdown*;CrashpadMetrics*;BrowserMetrics*;Safe Browsing *;Last *
FileDelete=%Profile%\Module Info Cache
FileDelete=%Profile%\Default\*.tmp;*-journal;log;log.old;*.log
FileDelete=.\Browser\*.log
DirRemove=%Profile%\Default\Cache
DirRemove=%Profile%\Default\Code Cache
DirRemove=%Profile%\Default\GPUCache
DirRemove=%Profile%\Default\Media Cache
DirRemove=%Profile%\Default\Pepper Data
DirRemove=%Profile%\Default\Service Worker\CacheStorage
DirRemove=%Profile%\Default\SStorage\ext\gfdkimpbcpahaombhbimeihdjnejgicl\def\Cache
DirRemove=%Profile%\Default\SStorage\ext\gfdkimpbcpahaombhbimeihdjnejgicl\def\Code Cache

[Options]
DeleteTemp=true
ShowSplash=false
WriteLog=false
ShowTrayTip=false