- The application needs to be packaged as an
exe
.
I used launch4j for this. Make sure textVersion
and icon
is set.
- A lot of registry keys need to be created. I've pieced those together by looking at this post (kindly linked by @Tarun Lalwani), this post, and the registry entries created by firefox. This means some of them might not be necessary.
Register client
[HKEY_LOCAL_MACHINE\SOFTWARE\Clients\StartMenuInternet\MyApp\Capabilities]
'ApplicationDescription'='MyApp'
'ApplicationIcon'='C:\MyApp\MyApp.exe,0'
'ApplicationName'='MyApp'
[HKEY_LOCAL_MACHINE\SOFTWARE\Clients\StartMenuInternet\MyApp\Capabilities\URLAssociations]
'http'='MyAppURL'
'https'='MyAppURL'
[HKEY_LOCAL_MACHINE\SOFTWARE\Clients\StartMenuInternet\MyApp\DefaultIcon]
@='C:\MyApp\MyApp.exe,0'
[HKEY_LOCAL_MACHINE\SOFTWARE\Clients\StartMenuInternet\MyApp\shell\open\command]
@='C:\MyApp\MyApp.exe'
Register url handler
[HKEY_LOCAL_MACHINE\Software\Classes\MyAppURL]
@='MyApp Document'
'EditFlags'=0x2
'FriendlyTypeName'='MyApp Document'
'URL Protocol'=''
[HKEY_LOCAL_MACHINE\Software\Classes\MyAppURL\DefaultIcon]
@='C:\MyApp\MyApp.exe,0'
[HKEY_LOCAL_MACHINE\Software\Classes\MyAppURL\shell]
@='open'
[HKEY_LOCAL_MACHINE\Software\Classes\MyAppURL\shell\open\command]
@='"C:\MyApp\MyApp.exe" --url "%1"'
Register to default programs
[HKEY_LOCAL_MACHINE\SOFTWARE\RegisteredApplications]
'MyApp'='Software\Clients\StartMenuInternet\MyApp\Capabilities'
- Now the application can be selected in the windows settings