We have used Xunlei Browser, when you click to download Xunlei download link, the browser will ask if you want to open the Xunlei application, after clicking to open, Xunlei can get the download address, and then download the operation.
For example:
The principle is that when the Thunderbolt program is installed, it will register a thunder protocol with the system, and the registration protocol is to write the corresponding data to the registry.
Registry address: HKEY_CLASSES_ROOT\thunder
Registry content:
Since you know the principle, it is very easy to implement.
.net writes the corresponding information to the registry and registers its own protocol, the code is as follows:
Testing with Google Chrome, we typed in the browser address:
itsvse://test_open_application The results are as follows:
We can also successfully obtain the parameters passed to us.
Using other browsers "ie" and "edge" can open the application normally, as shown below:
html open local application code as follows:
Note:The registered agreement name cannot contain an underscore。
Source code download:
Tourists, if you want to see the hidden content of this post, please Reply
(End)
|