The library(registry) is only available on the 
MS-Windows version of SWI-Prolog. It loads the foreign extension plregtry.dll, 
providing the predicates described below. This library only makes the 
most common operations on the registry available through the Prolog 
user. The underlying DLL provides a more complete coverage of the 
Windows registry API. Please consult the sources in
pl/src/win32/foreign/plregtry.c for further details.
In all these predicates, Path refers to a `/' separated 
path into the registry. This is not an atom containing 
`/'-characters as used for filenames, but a term using the functor //2 . 
Windows defines the following roots for the registry:
classes_root,
current_user,
local_machine and
users
prolog.type.
Name is the name visible in the Windows file-type browser. 
Finally, OpenAction defines the action to execute when a file 
with this extension is opened in the Windows explorer.
shell_register_prolog(Ext) :-
        current_prolog_flag(argv, [Me|_]),
        concat_atom(['"', Me, '" "%1"'], OpenCommand),
        shell_register_file_type(Ext, 'prolog.type', 'Prolog Source',
                                 OpenCommand),
        shell_register_dde('prolog.type', consult,
                           prolog, control, 'consult(''%1'')', Me), 
        shell_register_dde('prolog.type', edit,
                           prolog, control, 'edit(''%1'')', Me).