Starting an exe from within the browser

All, I'm writing a Rails based app. I'm still on Rails version 1.2.2. I need to start an external app from within the browser, only IE and pass an argument to it. The only way I found was using ActiveX.

  <script language="javascript" type="text/javascript">     function OpenFile(cmd){       var x = new ActiveXObject("WScript.Shell");       x.run(cmd)     }   </script>

and then call it with

onClick="OpenFile('C:\\projects\\some.exe c:\\projects\ \someinputfile.rpt')

This works if I just use a regular HTML file and call it. In Rails for testing I call it like this:

<div> some content </div> <script type="text/javascript">     function OpenFile(){         alert("Starting ActiveX");         var x = new ActiveXObject("WScript.Shell");         x.run("C:\\projects\\some.exe c:\\projects\ \someinputfile.rpt')     }

    OpenFile(); </script>

The function gets called but the ActiveXObject never gets created. Any ideas? Regards Peter

The function gets called but the ActiveXObject never gets created. Any ideas?

By regular html file i assume you mean that you just pasted that into
a .html and opened it. That almost certainly means that different
security settings are used from the rails app (since that is bytes
arriving over the network (albeit from the same machine))

Fred

Thank you for the quick reply, lowering the security did the trick. Peter