如何在html或php页面请求时安装dll [关闭]

I have a problem in Web page. Problem is that When I request a page e.g. index.html then I want to install a dll on that machine from which the request is occurred.

EDIT : I can understand you all are guys are correct but I need it. e.g. When we open mostly adobe site then there is a message prompt and say to us please add this plugin. So i have also this type of requirement.

Short answer : You can't.

Long answer : You cannot.

This is one of the way to install virus/malware on PCs. Modern browsers have extensive protection to prevent this.

If you still want to do this, you will need to :

  1. Find an exploit in the browser.
  2. Escape the sandbox if present.
  3. Find a way to run arbitrary command on the host which will fetch and install your dll.

    While you are at it,

  4. Register at Pwn2Own
  5. Demonstrate exploit and win a lot of cash.

EDIT : In wake of poster's comment, The most you can do is ask the user to download a program created by you which will add the dll to their pc, along with the necessary changes/files required for all the browsers to find and load that dll as a plugin. In doing so you are severely restricting your audience, as very few will want to do this. Everyone will consider it unsafe and rightfully so.

My advice would be to try and implement it using the available software/plugins like flash/java applets as far as possible. They can mirror native applications very well. If you absolutely must you can also use NaCl on chrome to get even more native client features.