windows - URI scheme launching -
i've been given task create protocol similar callto:, - upon clicking on link - automatically launch installed aplication.
i followed microsoft guide on how scheme should like.
my scheme looks this:
hkey_classes_root slican url protocol = "" defaulticon (default) = "c:\users\okabe\desktop\slican\slicanp.exe,1" shell open command (default) = "c:\users\okabe\desktop\slican\slicanp.exe" "%1""
i thought , tested with
<a href="slican:test">test link</a> <a href="slican:0049325778421">test telephone link</a>
there no reaction whatsoever. internet explorer asked me if want search program can open content , chrome responded nothing, if clicked javascript:void(0).
how worked?
thank help!
the registration show works fine me when try on windows 7. local app registered in place of slicanp.exe ran fine when invoked slican:
url start | run
menu, , within address bar of windows explorer. registration works.
do aware internet explorer runs in lower integrity security context, may not have rights run local programs. when tried click on html link slican:
url, or type slican:
url in address bar, ie had trouble executing local app (even after prompting permission). had ran ie administrator, local app ran fine.
also, should not creating hkey_classes_root\slican
key directly. create hkey_current_user\software\classes\slican
(current user only) or hkey_local_machine\software\classes\slican
(all users) instead. refer msdn more details:
merged view of hkey_classes_root
update: since works in windows 7, microsoft changed how url schemes registered in windows 8. instance, phone/store apps use uri activation:
the documentation says there 2 ways register custom uri scheme:
internet explorer uses 2 mechanisms registering new pluggable protocol handlers. first method register uri scheme name , associated application attempts navigate uri using scheme launch application (for example, registering applications handle mailto: or news: uris). second method uses asynchronous pluggable protocols api, allows define new protocols mapping uri scheme class.
you doing first. try using second instead.
however, noticed "asynchronous pluggable protocols" listed on msdn in "legacy apis" section, , has following note: "third-party protocol implementations won't load in windows store apps using javascript, or in internet explorer in new windows ui.". may or may not work in windows 8.
update: found this:
in windows 8, relationship between apps , file types support differs previous versions of windows.
walkthrough: using windows 8 custom protocol activation
the file type , protocol association model has changed in windows 8. apps no longer able programmatically set default handler file type or protocol. instead, user controls default handler file type or protocol.
your app can use existing protocols communication, such mailto, or create custom protocol. protocol activation extension enables define custom protocol or register handle existing protocol.
also have @ this:
setting mailto: protocol handler programmatically in windows 8
and this:
Comments
Post a Comment