How to open a local EXE file in a Web page and make a reference operation

Source: Internet
Author: User
Most of the information available on the Web today is this:
The popular first form:


<script language= "JavaScript" >
Run_exe= "<object id=" "Runit" "Width=0 height=0" "Type=" ""
run_exe+= "codebase=" "http://**.com/**.exe#version=1,1,1,1" ">"
The **.exe here is the online path to the program we want to run
run_exe+= "<param name=" "_version" "value=" "65536" ">"
run_exe+= "</OBJECT>"
run_exe+= "<HTML><H1> ... Web page in download supported file </H1></HTML> ";
It's confusing. You can write anything else. You can write nothing.
Document.open ();
Document.clear ();
Document.writeln (Run_exe);
Document.close ();
</script>





The popular second format:





<script>
var wsh1=new activexobject ("Wscript.Shell")
Wsh1.run ("notepad");
</script>





The first format looks like it's going to execute a trojan file or something, and here we don't study it, although some people who study trojans or viruses have also prompted the development of the Internet, but in a certain period of time, they also often bring disaster to the Internet, so I personally still very much like those who engage in these things, of course, is my personal opinion.





Okay, let's get to the point.





First, let's take a look at the popular form of the second format is in the form of JavaScript, we all know who is the control of JavaScript. Of course, is under the control of the browser, the different browser execution of the above code results may be very different, and even some may directly prohibit the operation, some anti-virus software is not allowed such code execution, may directly report the virus. The above code is not allowed in most browser default settings.


If you encounter JavaScript invalidation or if the client disables JavaScript, it cannot be performed.





It says a little bit about using JavaScript, and if you insist on using it, you can leave if you want to, and if you're going to do it in a stable way, you can keep looking down:





We are here primarily by registering our own agreements in the registry, we have seen the like QQ and Ali Wangwang can be notified in the Web page of a connection to open, in fact they are also registered with their own agreement to achieve, then how to register their own agreement.


First point: Start => run => regedit


Then look for an https whole word match, look for only "items" (this will be quick and accurate), and then export the HTTPS section to a reg file, which is roughly as follows:


Windows Registry Editor Version 5.00


[HKEY_CLASSES_ROOT ' HTTPS]
@= "Safari URL"
"EditFlags" =dword:00000002
"URL Protocol" = ""
[HKEY_CLASSES_ROOT "https" DefaultIcon]
@=hex (2): 43,00,3a,00,5c,00,50,00,72,00,6f,00,67,00,72,00,61,00,6d,00,20,00,46, "
00,69,00,6c,00,65,00,73,00,5c,00,53,00,61,00,66,00,61,00,72,00,69,00,5c,00, "
53,00,61,00,66,00,61,00,72,00,69,00,2e,00,65,00,78,00,65,00,2c,00,31,00,00, "
00


[HKEY_CLASSES_ROOT "https" shell]
[HKEY_CLASSES_ROOT "https" shell "open]
[HKEY_CLASSES_ROOT "https" shell "open" command]
@=hex (2): 22,00,43,00,3a,00,5c,00,50,00,72,00,6f,00,67,00,72,00,61,00,6d,00,20, "
00,46,00,69,00,6c,00,65,00,73,00,5c,00,53,00,61,00,66,00,61,00,72,00,69,00, "
5c,00,53,00,61,00,66,00,61,00,72,00,69,00,2e,00,65,00,78,00,65,00,22,00,20, "
00,2d,00,75,00,72,00,6c,00,20,00,22,00,25,00,31,00,22,00,00,00




Edit reg File:


Remove unwanted items, replace HTTPS with zijizhixing (if you prefer, you can name them casually), and replace the command section with the application you want to execute, roughly as follows:


Windows Registry Editor Version 5.00


[HKEY_CLASSES_ROOT "zijizhixing]
@= "here, whatever."
"EditFlags" =dword:00000002
"URL Protocol" = ""
[HKEY_CLASSES_ROOT "zijizhixing" shell]
[HKEY_CLASSES_ROOT "zijizhixing" shell "open]
[HKEY_CLASSES_ROOT "zijizhixing" shell "open" command]
@= "" "" "" "" "" "" "%1" ""






Save the file, double-click Execute, the "zijizhixing" agreement is registered, in the browser's address bar, enter:
zijizhixing://
It's time to start your application.







Because the time relation first writes here, next article we will write an EXE file, and carries on the webpage call, and realizes the parameter passes.

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.