How IE calls a local application

Source: Internet
Author: User

IE calls local applications based on browser applications, which are not expressive enough. We often think that in a webpage, click a link, how nice it is to be able to directly call the installed executable program. According to Microsoft's recommendation, ActiveX is used to embed executable programs into webpages, such as flash ActiveX. In this way, we need to purchase ActiveX signatures. If we do not use signatures, we cannot load them in IE6. It is too expensive to purchase ActiveX signatures for a small project. In addition, it is often necessary to consider what to do if the user suddenly closes the browser. This has little impact on playing a flash, song, and so on. However, in many cases, the battlefield cannot be cleaned before it is closed, causing catastrophic consequences. Generally, in enterprise applications, we always directly call exe through IE.
In windows, the registry contains information about various protocols (http, ftp, telnet, and so on), including parameters of the default open mode. Try it. Enter telnet: // www.163.com in the address bar of IE. What is the problem? A command line window is displayed to start the telnet operation. Why can't IE complete "telnet1: // parameter?
REGEDIT4 [HKEY_LOCAL_MACHINE \ SOFTWARE \ Classes \ notenote] @ = "URL: notenoteProtocol "www.2cto.com" URL Protocol "=" notepad.exe "[HKEY_LOCAL_MACHINE \ SOFTWARE \ Classes \ notenote \ DefaultIcon] @ =" notepad.exe, 1 "[HKEY_LOCAL_MACHINE \ SOFTWARE \ Classes \ notenote \ shell] [HKEY_LOCAL_MACHINE \ SOFTWARE \ Classes \ notenote \ shell \ open] [HKEY_LOCAL_MACHINE \ SOFTWARE \ Classes \ notenote \ shell \ open \ command] @ = "\" notepad.exe \", \ "% 1 \""
Import this item to the Registry, and then input notenote in the browser: // you will be pleasantly surprised. Here, the idea is clear. In our installer, set up a protocol in the registry, such as the notenote above, and then write the path information of the exe to be executed, directly click a hyperlink on the webpage, and the Protocol: // parameter is OK. The exe file accepts this parameter for processing. Done. Remember, Protocol: // All strings following are considered as a parameter. Then, the exe file will always have only two parameters. parameter 0 is its complete execution path, and parameter 1 is the character string transmitted from the webpage.
Author wenuy

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.