I need help creating a registry file. Detailed question, should be easy to answer.

chrisdab

n00b
Joined
Oct 16, 2005
Messages
18
I want to create a protocal handler for webcal:// links, kind of like html:// links.

I want to create a registry key for a webcal link so that it can open external programs from IE or Firefox. these links start with webcal://, kind of like html:// links. I tried creating a registry file following these tutorials:
http://msdn2.microsoft.com/en-us/library/aa767914.aspx
http://blogs.msdn.com/noahc/archive/...l-handler.aspx

When I created the file and named it webcal.reg, I get the error message: The specified file is not a registry script. You can only import binary registry files from within the registry editor.
this is the reg file I used:
--
[HKEY_CLASSES_ROOT]
[webcal]
(Default) = "URL:Webcal Protocol Handler"
URL Protocol = ""
[DefaultIcon]
(Default) = "sunbird.exe”
[shell]
[open]
[command]
(Default) = "E:\Program Files\Mozilla Sunbird\sunbird.exe "%1""
--

help pls thanks
 
You don't need to create a .reg file to perform those changes. Manually go into regedit and browse to that location and manually create the keys and entries yourself one time and you're done.

Does that make sense?
 
Or if you really need a .reg file, export a similar key to a .reg file, then open it in notepad and edit it.
 
You're missing a very important line in your file:

Code:
Windows Registry Editor Version 5.00

You're specifying the branch wrong. You have to specify each branch as in []. It has to be a valid registry branch. You've got
[webcall]
[defaulticon]
[shell]
[open]
[command]

Thats all invalid. I'm assuming you want them under HKEY_Classes_ROOT\Webcall, so you need to change them. See below.

You've got the values wrong. You're not putting quotes in the right spot.

Code:
"MyKey"="MyValue"

So:
Code:
Windows Registry Editor Version 5.00
[branch]
"MyKey"="MyValue"

or in your case:
Code:
Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\Webcall]
@="URL:Webcal Protocol Handler"
"URL Protocol"=""

[HKEY_CLASSES_ROOT\Webcall\DefaultIcon]
@ = "sunbird.exe”

[HKEY_CLASSES_ROOT\Webcall\Shell]
[HKEY_CLASSES_ROOT\Webcall\Open]
[HKEY_CLASSES_ROOT\Webcall\Command]
@="\"E:\Program Files\Mozilla Sunbird\sunbird.exe\" %1"

Some things to point out:

@ = default

You need to escape your quotes. Sometimes you have to play around to get it the right way, as it isn't common sense if you're not familiar with escaping quotes for long filenames. "\"E:\program files\" %1" would look like this to us: "E:\Program Files" %1


Now, I'm not saying this will do what you want, but it should at least get the information into the registry for you.
 
Wow thanks demon. This should be the finished version then.
--
Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\Webcal]
@="URL:Webcal Protocol Handler"
"URL Protocol"=""

[HKEY_CLASSES_ROOT\Webcal\DefaultIcon]
@ = "E:\Program Files\Mozilla Sunbird\sunbird.exe\"

[HKEY_CLASSES_ROOT\Webcal\Shell]
[HKEY_CLASSES_ROOT\Webcal\Open]
[HKEY_CLASSES_ROOT\Webcal\Command]
@="\"E:\Program Files\Mozilla Sunbird\sunbird.exe\" %1"
--

also can I use REGEDIT4 or REGEDIT5 instead of typing out Windows Registry Editor Version 5.00?
 
Well that sucks. I cant get it to work, but your right, it did get entered into the registry.

I tried adjusting it to look like other keys in the registry but still no go.
 
Give this a shot:

Code:
Windows Registry Editor Version 5.00

[HKEY_CLASSES_ROOT\Webcal]
"URL Protocol"=""
@="Webcal Protocol Handler"

[HKEY_CLASSES_ROOT\Webcal\Default Icon]
@="e:\\program files\\mozilla sunbird\\sunbird.exe"

[HKEY_CLASSES_ROOT\Webcal\Shell]

[HKEY_CLASSES_ROOT\Webcal\Shell\Open]

[HKEY_CLASSES_ROOT\Webcal\Shell\Open\Command]
@="e:\\program files\\mozilla sunbird\\sunbird.exe %1"
 
Worked like a charm. The keys were all entered correctly.

It opened in Internet Explorer, but not Firefox. But its pretty cool that it worked

thanks
 
I got it to work for firefox also.

here is a quote:

Now, to configure Firefox to handle the webcal:// protocol, you'll need to go into Firefox's configuration settings. Do the following:

1. In a blank tab, type about:config. You will be shown a page with a list of Firefox's configuration variables.

2. In the filter field, type network.protocol-handler. This will show a list of protocols handled by Firefox. You may or may not see the webcal protocol in the list. If it's there, it would look something like network.protocol-handler.external.webcal. The protocol is probably not there, though, in which case you'll need to add it.

3. To create the configuration setting, right-click on any item in the list and select New > Boolean. In the preference name, type network.protocol-handler.external.webcal, and set the value to true. This tells Firefox to use an external program to handle the webcal:// protocol.

4. Restart Firefox and you should be set.
 
Nice.

The next step is to fire up regedit and find out what making the change in firefox did. Just browse to the key you created and see what is new! Then you'll know exactly what you need to do next time!
 
Back
Top