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.