Open Local program via private Protocol Chrome browser page

Source: Internet
Author: User

Recent requirements: These two systems, based on a set of chrome, according to a set of IE, need to add a link to chrome, and then into the IE system development. This requires chrome to jump to create a link to the page specified by IE browser. It also realizes the animation of jumping. The first solution to the need for our chrome to go to IE problem.

Problem analysis: Jump from chrome to IE, directly in the form of HTTP link is not possible to jump to IE, only can be opened by a separate local program to open IE, the question is how to let Chrome open the program. There is a way to do this: by using the private protocol, users can invoke the local program directly with the private protocol when they click on the link.

Procedure: First, write a small program. Put it under the d://; next, write a private protocol register. Open with Notepad, and edit for example the following:

Windows Registry Editor Version 5.00



[HKEY_CLASSES_ROOT\F1]
@= "Url:f1 Protocol Handler"
"URL Protocol" = ""


[Hkey_classes_root\f1\shell]


[Hkey_classes_root\f1\shell\open]


[Hkey_classes_root\f1\shell\open\command]
@= "D:\\winmain.exe \"%1\ ""

Then save as F1.reg. The registration form is complete. The D:\\winmain.exe is the path of the applet, double-clicking the Fa.reg, and then the protocol can be written to the register, only need to call the F1 protocol in Chrome. Practice, open chrome. Create a new bookmark, save it, and edit the bookmark, for example, as you can see:


After saving. Click the bookmark to open the program.

Of course. The icon is not particularly nice and we can change it. To do this: Save all chrome bookmarks as an HTML file. My HTML bookmark file

watermark/2/text/ahr0cdovl2jsb2cuy3nkbi5uzxqvemh1ntmwntq4odux/font/5a6l5l2t/fontsize/400/fill/i0jbqkfcma==/ Dissolve/70/gravity/center ">

watermark/2/text/ahr0cdovl2jsb2cuy3nkbi5uzxqvemh1ntmwntq4odux/font/5a6l5l2t/fontsize/400/fill/i0jbqkfcma==/ Dissolve/70/gravity/center ">

The href followed by the protocol and address, Add_data followed by the time stamp of creation time, icon followed by the bookmark icon address after the Base64 conversion results. So want to change the icon, just need to find the corresponding F1 behind the icon, through the Base64 to convert the image address, and then copy it in.

In Chrome, you import bookmarks, and the changed bookmarks are imported. The bookmark icon will change to what you want. I don't give pictures here anymore. A friend who wants to try can get it by himself.

Next chapter I will realize the effect of small program: Smooth jump, scene animation, please pay attention!

Copyright notice: This article Bo Master original articles, blogs, without consent may not be reproduced.

Open Local program via private Protocol Chrome browser page

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.