[Launch]
ProgramExecutable=YTDownloader\YTDownloader.exe
WorkingDirectory=%PAL:AppDir%\YTDownloader
WaitForExe1=YTPlayer.exe
SinglePortableAppInstance=true
DirectoryMoveOK=yes
SupportsUNC=yes

[Activate]
Registry=true

[RegistryValueWrite]
Root: HKCU; SubKey: Software\YT Helper\YT Player\Settings; ValueType: dword; ValueName: UpdateCheck.Auto; ValueData: $00000000; Flags: uninsdeletevalue uninsdeletekeyifempty
Root: HKCU; SubKey: Software\YT Helper\YT Downloader\Settings; ValueType: dword; ValueName: UpdateCheck.Auto; ValueData: $00000000; Flags: uninsdeletevalue uninsdeletekeyifempty
Root: HKCU; SubKey: Software\YT Helper\YT Downloader\Settings; ValueType: dword; ValueName: AutoCheckUpdate; ValueData: $00000000; Flags: uninsdeletevalue uninsdeletekeyifempty
Root: HKCU; SubKey: Software\YT Helper\YT Downloader\Settings; ValueType: dword; ValueName: AutoUpdateServices; ValueData: $00000000; Flags: uninsdeletevalue uninsdeletekeyifempty

[RegistryKeys]
YTDownloader=HKCU\Software\YT Helper\YT Downloader
YTPlayer=HKCU\Software\YT Helper\YT Player
-=HKCU\Software\Microsoft\Direct3D\MostRecentApplication

[RegistryCleanupForce]
1=HKCU\Software\Classes\.download
2=HKCU\Software\Classes\YTApplications.YTDownloader.download
3=HKCU\Software\Classes\.playlist
4=HKCU\Software\Classes\YTApplications.YTPlayer.playlist
5=HKCR\CLSID\{E3AE51DE-3A0C-4cc3-B053-B1E2273F06B9}
6=HKCR\Wow6432Node\CLSID\{E3AE51DE-3A0C-4cc3-B053-B1E2273F06B9}
-=HKCU\Software\Microsoft\IntelliPoint\AppSpecific\YTDownloader.exe
-=HKCU\Software\Microsoft\IntelliType Pro\AppSpecific\YTDownloader.exe
-=HKCU\Software\Microsoft\IntelliPoint\AppSpecific\YTPlayer.exe
-=HKCU\Software\Microsoft\IntelliType Pro\AppSpecific\YTPlayer.exe

[RegistryCleanupIfEmpty]
1=HKCU\Software\YT Helper

[DirectoriesMove]
YTDownloader=%AppData%\YT Helper\YT Downloader
YTPlayer=%AppData%\YT Helper\YT Player

[DirectoriesCleanupIfEmpty]
1=%AppData%\YT Helper

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

[FileWrite2]
Type=Replace
File=%PAL:DataDir%\settings\YTDownloader.reg
Find=%PAL:LastPortableAppsBaseDir:DoubleBackslash%\\
Replace=%PAL:PortableAppsBaseDir:DoubleBackslash%\\

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