@echo off
echo Adding context menu association for CSO, PBP
cd ..\PSP2PS3
set CURDIR=%~dp0
reg add "HKEY_CLASSES_ROOT\.cso" /ve /d "UMDGen.Document" /f
reg add "HKEY_CLASSES_ROOT\UMDGen.Document\shell\open\command" /ve /f /d "\"%curdir%\tools\UMDGEN.exe\" %%1"
reg add "HKEY_CLASSES_ROOT\UMDGen.Document\shell\Convert CSO to PSP2PS3\command" /ve /f /d "\"%curdir%\ps3_minis.exe\" \"%%1\""
reg delete "HKEY_CLASSES_ROOT\UMDGen.Document\shell\Convert CSO to PSP2PS3 [with save fix]" /f

reg add "HKEY_CLASSES_ROOT\.pbp" /ve /d "pbp_archive" /f
reg add "HKEY_CLASSES_ROOT\pbp_archive\shell\Convert PBP to PSP2PS3\command" /ve /f /d "\"%curdir%\ps3_minis.exe\" \"%%1\""
reg delete "HKEY_CLASSES_ROOT\pbp_archive\shell\Convert PBP to PSP2PS3 [with save fix]" /f

reg add "HKEY_CLASSES_ROOT\.iso" /ve /d "ISO Image" /f
reg add "HKEY_CLASSES_ROOT\ISO Image\shell\Convert ISO to PSP2PS3\command" /ve /f /d "\"%curdir%\ps3_minis.exe\" \"%%1\""

reg add "HKEY_CLASSES_ROOT\.pkg" /ve /d "PKG File" /f
reg add "HKEY_CLASSES_ROOT\PKG File\shell\Convert PKG to PSP2PS3\command" /ve /f /d "\"%curdir%\ps3_minis.exe\" \"%%1\""
reg delete "HKEY_CLASSES_ROOT\PKG File\shell\Convert PKG to PSP2PS3 [with save fix]" /f
