Add Opera Portable to Default Programs

Portable apps should not be added to Windows Shell default programs via their own menu or settings, as this may break things.

To add Opera Portable from PortableApps to your Windows Default Apps list, place the following command file in the same folder where OperaPortable.exe launcher is and run it with admin privileges
@Echo Off
Title OperaPortable to Default Browser
echo Run in the same folder with OperaPortable.exe
cd %systemroot%\system32
call :IsAdmin

Reg.exe add "HKLM\SOFTWARE\RegisteredApplications" /v "Opera Portable" /t REG_SZ /d "Software\Clients\StartMenuInternet\OperaPortable\Capabilities" /f
Reg.exe add "HKLM\SOFTWARE\Clients\StartMenuInternet\OperaPortable\Capabilities" /v "ApplicationName" /t REG_SZ /d "Opera Portable" /f
Reg.exe add "HKLM\SOFTWARE\Clients\StartMenuInternet\OperaPortable\Capabilities" /v "ApplicationDescription" /t REG_SZ /d "Opera Portable" /f
Reg.exe add "HKLM\SOFTWARE\Clients\StartMenuInternet\OperaPortable\Capabilities" /v "ApplicationIcon" /t REG_SZ /d "\"%~dp0OperaPortable.exe\",0" /f
Reg.exe add "HKLM\SOFTWARE\Clients\StartMenuInternet\OperaPortable\Capabilities" /v "Hidden" /t REG_DWORD /d "0" /f
Reg.exe add "HKLM\SOFTWARE\Clients\StartMenuInternet\OperaPortable\Capabilities\FileAssociations" /v ".htm" /t REG_SZ /d "OperaPortableHTML" /f
Reg.exe add "HKLM\SOFTWARE\Clients\StartMenuInternet\OperaPortable\Capabilities\FileAssociations" /v ".html" /t REG_SZ /d "OperaPortableHTML" /f
Reg.exe add "HKLM\SOFTWARE\Clients\StartMenuInternet\OperaPortable\Capabilities\FileAssociations" /v ".shtml" /t REG_SZ /d "OperaPortableHTML" /f
Reg.exe add "HKLM\SOFTWARE\Clients\StartMenuInternet\OperaPortable\Capabilities\FileAssociations" /v ".xht" /t REG_SZ /d "OperaPortableHTML" /f
Reg.exe add "HKLM\SOFTWARE\Clients\StartMenuInternet\OperaPortable\Capabilities\FileAssociations" /v ".xhtml" /t REG_SZ /d "OperaPortableHTML" /f
Reg.exe add "HKLM\SOFTWARE\Clients\StartMenuInternet\OperaPortable\Capabilities\StartMenu" /v "StartMenuInternet" /t REG_SZ /d "OperaPortable" /f
Reg.exe add "HKLM\SOFTWARE\Clients\StartMenuInternet\OperaPortable\Capabilities\URLAssociations" /v "http" /t REG_SZ /d "OperaPortableURL" /f
Reg.exe add "HKLM\SOFTWARE\Clients\StartMenuInternet\OperaPortable\Capabilities\URLAssociations" /v "https" /t REG_SZ /d "OperaPortableURL" /f
Reg.exe add "HKLM\SOFTWARE\Clients\StartMenuInternet\OperaPortable\Capabilities\URLAssociations" /v "ftp" /t REG_SZ /d "OperaPortableURL" /f
Reg.exe add "HKLM\SOFTWARE\Clients\StartMenuInternet\OperaPortable" /v "LocalizedString" /t REG_SZ /d "Opera Portable" /f
Reg.exe add "HKLM\SOFTWARE\Clients\StartMenuInternet\OperaPortable" /ve /t REG_SZ /d "Opera Portable" /f
Reg.exe add "HKLM\SOFTWARE\Clients\StartMenuInternet\OperaPortable\DefaultIcon" /ve /t REG_SZ /d "\"%~dp0OperaPortable.exe\",0" /f
Reg.exe add "HKLM\SOFTWARE\Clients\StartMenuInternet\OperaPortable\shell\open\command" /ve /t REG_SZ /d "\"%~dp0OperaPortable.exe\"" /f
Reg.exe add "HKLM\SOFTWARE\Clients\StartMenuInternet\OperaPortable\shell\properties\command" /ve /t REG_SZ /d "\"%~dp0OperaPortable.exe\" -preferences" /f
Reg.exe add "HKLM\SOFTWARE\Classes\OperaPortableURL" /ve /t REG_SZ /d "Opera Portable URL" /f
Reg.exe add "HKLM\SOFTWARE\Classes\OperaPortableURL" /v "URL Protocol" /t REG_SZ /d "" /f
Reg.exe add "HKLM\SOFTWARE\Classes\OperaPortableURL\DefaultIcon" /ve /t REG_SZ /d "\"%~dp0OperaPortable.exe\",0" /f
Reg.exe add "HKLM\SOFTWARE\Classes\OperaPortableURL\shell\open\command" /ve /t REG_SZ /d "\"%~dp0OperaPortable.exe\" -url \"%%1\"" /f
Reg.exe add "HKLM\SOFTWARE\Classes\OperaPortableHTML" /ve /t REG_SZ /d "Opera Portable HTML" /f
Reg.exe add "HKLM\SOFTWARE\Classes\OperaPortableHTML\DefaultIcon" /ve /t REG_SZ /d "\"%~dp0OperaPortable.exe\",0" /f
Reg.exe add "HKLM\SOFTWARE\Classes\OperaPortableHTML\shell\open\command" /ve /t REG_SZ /d "\"%~dp0OperaPortable.exe\" -url \"%%1\"" /f
Exit

:IsAdmin
Reg.exe query "HKU\S-1-5-19\Environment"
If Not %ERRORLEVEL% EQU 0 (
Cls & Echo You must have administrator rights to continue ...
Pause & Exit
)
Cls
goto:eof

Then reboot your PC. After reboot, Opera Portable should appear as a separate item in default programs list, and you should be able to choose it as default browser for everything, including HTTP HTTPS FTP protocols.

Download the bat file

Leave a Comment