Categories
Windows

Add Chrome Portable to Default Apps in Windows

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

To add Chrome Portable from PortableApps to your Windows Default Apps list, place the following command file in the same folder where GoogleChromePortable.exe launcher is and run it with admin privileges
@Echo Off
Title Google Chrome Portable to Default Browser
echo Run in the same folder with GoogleChromePortable.exe
cd %systemroot%\system32
call :IsAdmin
Reg.exe add "HKLM\SOFTWARE\RegisteredApplications" /v "Chrome Portable" /t REG_SZ /d "Software\Clients\StartMenuInternet\GoogleChromePortable\Capabilities" /f
Reg.exe add "HKLM\SOFTWARE\Clients\StartMenuInternet\GoogleChromePortable\Capabilities" /v "ApplicationName" /t REG_SZ /d "Google Chrome Portable" /f
Reg.exe add "HKLM\SOFTWARE\Clients\StartMenuInternet\GoogleChromePortable\Capabilities" /v "ApplicationDescription" /t REG_SZ /d "Chromeasy" /f
Reg.exe add "HKLM\SOFTWARE\Clients\StartMenuInternet\GoogleChromePortable\Capabilities" /v "ApplicationIcon" /t REG_SZ /d "\"%~dp0GoogleChromePortable.exe\",0" /f
Reg.exe add "HKLM\SOFTWARE\Clients\StartMenuInternet\GoogleChromePortable\Capabilities" /v "Hidden" /t REG_DWORD /d "0" /f
Reg.exe add "HKLM\SOFTWARE\Clients\StartMenuInternet\GoogleChromePortable\Capabilities\FileAssociations" /v ".htm" /t REG_SZ /d "GoogleChromePortableHTML" /f
Reg.exe add "HKLM\SOFTWARE\Clients\StartMenuInternet\GoogleChromePortable\Capabilities\FileAssociations" /v ".html" /t REG_SZ /d "GoogleChromePortableHTML" /f
Reg.exe add "HKLM\SOFTWARE\Clients\StartMenuInternet\GoogleChromePortable\Capabilities\FileAssociations" /v ".shtml" /t REG_SZ /d "GoogleChromePortableHTML" /f
Reg.exe add "HKLM\SOFTWARE\Clients\StartMenuInternet\GoogleChromePortable\Capabilities\FileAssociations" /v ".xht" /t REG_SZ /d "GoogleChromePortableHTML" /f
Reg.exe add "HKLM\SOFTWARE\Clients\StartMenuInternet\GoogleChromePortable\Capabilities\FileAssociations" /v ".xhtml" /t REG_SZ /d "GoogleChromePortableHTML" /f
Reg.exe add "HKLM\SOFTWARE\Clients\StartMenuInternet\GoogleChromePortable\Capabilities\StartMenu" /v "StartMenuInternet" /t REG_SZ /d "GoogleChromePortable" /f
Reg.exe add "HKLM\SOFTWARE\Clients\StartMenuInternet\GoogleChromePortable\Capabilities\URLAssociations" /v "http" /t REG_SZ /d "GoogleChromePortableURL" /f
Reg.exe add "HKLM\SOFTWARE\Clients\StartMenuInternet\GoogleChromePortable\Capabilities\URLAssociations" /v "https" /t REG_SZ /d "GoogleChromePortableURL" /f
Reg.exe add "HKLM\SOFTWARE\Clients\StartMenuInternet\GoogleChromePortable\Capabilities\URLAssociations" /v "ftp" /t REG_SZ /d "GoogleChromePortableURL" /f
Reg.exe add "HKLM\SOFTWARE\Clients\StartMenuInternet\GoogleChromePortable" /v "LocalizedString" /t REG_SZ /d "Google Chrome Portable" /f
Reg.exe add "HKLM\SOFTWARE\Clients\StartMenuInternet\GoogleChromePortable" /ve /t REG_SZ /d "Google Chrome Portable" /f
Reg.exe add "HKLM\SOFTWARE\Clients\StartMenuInternet\GoogleChromePortable\DefaultIcon" /ve /t REG_SZ /d "\"%~dp0GoogleChromePortable.exe\",0" /f
Reg.exe add "HKLM\SOFTWARE\Clients\StartMenuInternet\GoogleChromePortable\shell\open\command" /ve /t REG_SZ /d "\"%~dp0GoogleChromePortable.exe\"" /f
Reg.exe add "HKLM\SOFTWARE\Clients\StartMenuInternet\GoogleChromePortable\shell\properties\command" /ve /t REG_SZ /d "\"%~dp0GoogleChromePortable.exe\" -preferences" /f
Reg.exe add "HKLM\SOFTWARE\Classes\GoogleChromePortableURL" /ve /t REG_SZ /d "Google Chrome Portable URL" /f
Reg.exe add "HKLM\SOFTWARE\Classes\GoogleChromePortableURL" /v "URL Protocol" /t REG_SZ /d "" /f
Reg.exe add "HKLM\SOFTWARE\Classes\GoogleChromePortableURL\DefaultIcon" /ve /t REG_SZ /d "\"%~dp0GoogleChromePortable.exe\",0" /f
Reg.exe add "HKLM\SOFTWARE\Classes\GoogleChromePortableURL\shell\open\command" /ve /t REG_SZ /d "\"%~dp0GoogleChromePortable.exe\" -url \"%%1\"" /f
Reg.exe add "HKLM\SOFTWARE\Classes\GoogleChromePortableHTML" /ve /t REG_SZ /d "Google Chrome HTML" /f
Reg.exe add "HKLM\SOFTWARE\Classes\GoogleChromePortableHTML\DefaultIcon" /ve /t REG_SZ /d "\"%~dp0GoogleChromePortable.exe\",0" /f
Reg.exe add "HKLM\SOFTWARE\Classes\GoogleChromePortableHTML\shell\open\command" /ve /t REG_SZ /d "\"%~dp0GoogleChromePortable.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, Chrome Portable should appear as a separate item in default programs list, and you should be able to select it as default browser for everything, including HTTP HTTPS FTP protocols.

Download the batch file here (unzip, place in the same folder as Chrome Portable launcher and run as admin)

Leave a Reply