Skip to content

Instantly share code, notes, and snippets.

@regularentropy
Last active September 10, 2025 10:13
Show Gist options
  • Save regularentropy/8a61e32d444e7016ed1839f73981fd8d to your computer and use it in GitHub Desktop.
Save regularentropy/8a61e32d444e7016ed1839f73981fd8d to your computer and use it in GitHub Desktop.
:: Author: @mimiru
@echo off
setlocal
:: Determine the path to floorp.exe
set "FLOORP_PATH=%~dp0floorp.exe"
:: Convert the path to use double backslashes for the registry
set "FLOORP_PATH=%FLOORP_PATH:\=\\%"
:: Add registry entries
reg add "HKCU\Software\Classes\FloorpPHTML" /v "" /t REG_SZ /d "Floorp HTML Document" /f
reg add "HKCU\Software\Classes\FloorpPHTML" /v "EditFlags" /t REG_DWORD /d "0x2" /f
reg add "HKCU\Software\Classes\FloorpPHTML" /v "FriendlyTypeName" /t REG_SZ /d "Floorp HTML Document" /f
reg add "HKCU\Software\Classes\FloorpPHTML\Application" /v "ApplicationIcon" /t REG_SZ /d "%FLOORP_PATH%,0" /f
reg add "HKCU\Software\Classes\FloorpPHTML\Application" /v "ApplicationName" /t REG_SZ /d "Floorp" /f
reg add "HKCU\Software\Classes\FloorpPHTML\DefaultIcon" /ve /t REG_SZ /d "%FLOORP_PATH%,1" /f
reg add "HKCU\Software\Classes\FloorpPHTML\shell\open\command" /ve /t REG_SZ /d "%FLOORP_PATH% -url \"%%1\"" /f
:: For FloorpPDF
reg add "HKCU\Software\Classes\FloorpPPDF" /v "" /t REG_SZ /d "Floorp PDF Document" /f
reg add "HKCU\Software\Classes\FloorpPPDF" /v "EditFlags" /t REG_DWORD /d "0x2" /f
reg add "HKCU\Software\Classes\FloorpPPDF" /v "FriendlyTypeName" /t REG_SZ /d "Floorp PDF Document" /f
reg add "HKCU\Software\Classes\FloorpPPDF\DefaultIcon" /ve /t REG_SZ /d "%FLOORP_PATH%,5" /f
reg add "HKCU\Software\Classes\FloorpPPDF\shell\open\command" /ve /t REG_SZ /d "%FLOORP_PATH% -url \"%%1\"" /f
:: For FloorpPURL
reg add "HKCU\Software\Classes\FloorpPURL" /v "" /t REG_SZ /d "Floorp URL" /f
reg add "HKCU\Software\Classes\FloorpPURL" /v "EditFlags" /t REG_DWORD /d "0x2" /f
reg add "HKCU\Software\Classes\FloorpPURL" /v "FriendlyTypeName" /t REG_SZ /d "Floorp URL" /f
reg add "HKCU\Software\Classes\FloorpPURL\DefaultIcon" /ve /t REG_SZ /d "%FLOORP_PATH%,1" /f
reg add "HKCU\Software\Classes\FloorpPURL\shell\open\command" /ve /t REG_SZ /d "%FLOORP_PATH% -url \"%%1\"" /f
:: For StartMenuInternet\Floorp
reg add "HKCU\Software\Clients\StartMenuInternet\Floorp" /ve /t REG_SZ /d "Floorp" /f
reg add "HKCU\Software\Clients\StartMenuInternet\Floorp\Capabilities" /v "ApplicationDescription" /t REG_SZ /d "Floorp delivers safe, easy web browsing. A familiar user interface, enhanced security features including protection from online identity theft, and integrated search let you get the most out of the web." /f
reg add "HKCU\Software\Clients\StartMenuInternet\Floorp\Capabilities" /v "ApplicationIcon" /t REG_SZ /d "%FLOORP_PATH%,0" /f
reg add "HKCU\Software\Clients\StartMenuInternet\Floorp\Capabilities" /v "ApplicationName" /t REG_SZ /d "Floorp" /f
reg add "HKCU\Software\Clients\StartMenuInternet\Floorp\Capabilities" /v "StartMenu" /t REG_SZ /d "Floorp" /f
:: Add FileAssociations
reg add "HKCU\Software\Clients\StartMenuInternet\Floorp\Capabilities\FileAssociations" /v ".pdf" /t REG_SZ /d "FloorpPPDF" /f
reg add "HKCU\Software\Clients\StartMenuInternet\Floorp\Capabilities\FileAssociations" /v ".avif" /t REG_SZ /d "FloorpPHTML" /f
reg add "HKCU\Software\Clients\StartMenuInternet\Floorp\Capabilities\FileAssociations" /v ".htm" /t REG_SZ /d "FloorpPHTML" /f
reg add "HKCU\Software\Clients\StartMenuInternet\Floorp\Capabilities\FileAssociations" /v ".html" /t REG_SZ /d "FloorpPHTML" /f
reg add "HKCU\Software\Clients\StartMenuInternet\Floorp\Capabilities\FileAssociations" /v ".shtml" /t REG_SZ /d "FloorpPHTML" /f
reg add "HKCU\Software\Clients\StartMenuInternet\Floorp\Capabilities\FileAssociations" /v ".svg" /t REG_SZ /d "FloorpPHTML" /f
reg add "HKCU\Software\Clients\StartMenuInternet\Floorp\Capabilities\FileAssociations" /v ".webp" /t REG_SZ /d "FloorpPHTML" /f
reg add "HKCU\Software\Clients\StartMenuInternet\Floorp\Capabilities\FileAssociations" /v ".xht" /t REG_SZ /d "FloorpPHTML" /f
reg add "HKCU\Software\Clients\StartMenuInternet\Floorp\Capabilities\FileAssociations" /v ".xhtml" /t REG_SZ /d "FloorpPHTML" /f
:: Add URLAssociations
reg add "HKCU\Software\Clients\StartMenuInternet\Floorp\Capabilities\URLAssociations" /v "http" /t REG_SZ /d "FloorpPHTML" /f
reg add "HKCU\Software\Clients\StartMenuInternet\Floorp\Capabilities\URLAssociations" /v "https" /t REG_SZ /d "FloorpPHTML" /f
reg add "HKCU\Software\Clients\StartMenuInternet\Floorp\Capabilities\URLAssociations" /v "mailto" /t REG_SZ /d "FloorpPHTML" /f
:: Add DefaultIcon
reg add "HKCU\Software\Clients\StartMenuInternet\Floorp\DefaultIcon" /ve /t REG_SZ /d "%FLOORP_PATH%,0" /f
:: Add shell\open\command
reg add "HKCU\Software\Clients\StartMenuInternet\Floorp\shell\open\command" /ve /t REG_SZ /d "%FLOORP_PATH%" /f
:: Add shell\properties\command
reg add "HKCU\Software\Clients\StartMenuInternet\Floorp\shell\properties\command" /ve /t REG_SZ /d "%FLOORP_PATH% -preferences" /f
:: Add shell\safemode\command
reg add "HKCU\Software\Clients\StartMenuInternet\Floorp\shell\safemode\command" /ve /t REG_SZ /d "%FLOORP_PATH% -safe-mode" /f
:: Add RegisteredApplications
reg add "HKCU\Software\RegisteredApplications" /v "Floorp" /t REG_SZ /d "Software\\Clients\\StartMenuInternet\\Floorp\\Capabilities" /f
endlocal
@nOrphf
Copy link

nOrphf commented Jul 27, 2024

Nicely done!

You could consider adding the -osint to the command path, to help protect floorp.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment