Search code examples
registryhandler

adding a key to the registry


I am trying to follow instructions in

https://msdn.microsoft.com/en-us/library/aa767914(v=vs.85).aspx#app_reg

but I am not very familiar with regedit. What I do not understand, is how to add the following to the registry:

HKEY_CLASSES_ROOT alert (Default) = "URL:Alert Protocol" URL Protocol = "" DefaultIcon (Default) = "alert.exe,1" shell open command (Default) = "C:\Program Files\Alert\alert.exe" "%1"

Can I do this in regedit? Is there a file to which I can just add these lines? Thanks a lot in advance!

All the best,

Giuseppe


Solution

    1. Open RegEdit (elevated)
    2. Right click on HKEY_CLASSES_ROOT then select New > Key
    3. Type 'alert'
    4. Right click on 'alert' then select New > String value
    5. Type (Default), then double click on the entry and write your value ie. "URL:Alert Protocol"
    6. Repeat for the other entries, respecting the hierarchy and entry type of your list (NB. in the link you provided - DefaultIcon, shell, open and command are all Keys and the (Default) entries are all String Value)

    Once you have all your entries, you can always right-click on any of the keys (the folders) and "Export" to file. Importing the resulting file is easy - just click on it :)

    Hope this helps.

    Leo