开发者

Run command on client side from browser

For our intraNET we need to run application, when user clicks on link. Security is done another way (apache, firewall)开发者_运维技巧. This is only for users in our company. Operation system is WindowsXP+ (some Linux).

I tried link to script file (http://intranet.domain.com/run.bat):

  1. Chrome

    • can't change mimetype
    • browser downloads it, and after doubleclick and warning it works with .bat
  2. Opera

    • with mimetypes tunning, it works with .lnk file, immediatly after click
  3. Firefox

    • with mimetypes tunning, it works with .lnk file, immediatly after click
  4. Explorer

    • .bat file works after warning and click on 'Run'
  5. Safari

    • .bat file works after warning and click on 'Run'

It works, but with warnings and clicking. Maybe there are some other solutions (i read here) using AIR2 plugin or NPAPI plugin, but i have no experiences.

I am looking for ready to use plugin written for this purpose (commercial too). Of course we can install any application/plugin on client computer. Plugin which i can render on webpage and configure to run some command with parameters on click event (command and parameters could change on every page load, can not be compiled in plugin).

I know, there are some questions on this topic, but.. i did not find good solution. Thank you for any help.


All those warnings are there for a reason! If you could run a batch file in this way without warning this would be a huge security risk.

The best way to get this to work would be to write a signed ActiveX control that users download to their PC, install (which would require that the user confirm that they wish to install the control) and then have the ActiveX control run the batch file. This would then allow the ActiveX control to run batch files without prompting the user, however is probably way more hassle than its worth for a one-off action.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜