-1

I want to install a NPAPI plugin as soon as my web page detects if the plugin is not there.

The installation or a batch script should be run in the background without asking the user. But I think installation will require user permission, so running a batch file is preferable.

If I need to run a batch to register the plugin's dll from javascript, how can I do that?

abhim
  • 1,126
  • 1
  • 9
  • 19
  • 1
    Obviously a web page isn't allowed to install anything without asking the user. – jeb Oct 18 '13 at 09:43

1 Answers1

0

You can't. If you find a way to do so anyway, please let us know so that the security vulnerability can be fixed.

If you could automatically run a script, installer, or batch file without the user's permission or knowledge that would be called a "virus". that's generally considered a bad thing...

You could look into Native Client, though it only works on Chrome; Native Client plugins can be installed without user intervention because they are sandboxed with limited access to the user's computer.

taxilian
  • 14,229
  • 4
  • 34
  • 73
  • I have thought of doing it by detecting if the plugin has been installed using 'navigator.plugins' function. If not installed, I will give a link to a MSI installer which will install the plugin (in case of Windows only) – abhim Oct 18 '13 at 20:37
  • That is what I do. It does require user intervention, but when you think about it that's kinda a good thing. Note that you'll need to do a navigator.plugins.refresh(false) in order to have it rescan for new plugins – taxilian Oct 18 '13 at 20:40
  • Thanks for the **navigator.plugins.refresh** functionality – abhim Oct 18 '13 at 20:42