How to execute an executable file (ex: notepad) using javascript which will work in Mozilla Firefox browser RRS feed

  • Question

  • Hi,

    I don't know in which forum I have to place this question.

    I'm opening a notepad  using javascript from an html page by clicking one of the buttton on the page. This is working fine in IE, but not working in Firefox. Is there any compatability issues.

    My code is:

         <script language="JavaScript" type="text/javascript"> 
             MyObject = new ActiveXObject( "WScript.Shell" ) 
             function RunNotePad()  
                MyObject.Run("notepad.exe") ; 
        <h1>Run a Program</h1>
        This script launch the file >> c:\windows\notepad.exe<p>
        <button onclick="RunNotePad()">Run Windows NotePad</button>

    Can anyone tell me the solution for this.
    If there is any alternative way to do this, plz tell the solution.

    Tuesday, July 1, 2008 6:35 AM

All replies

  • MSDN forums are probably not the best place to get help with Firefox questions.  Try the mozilla newsgroups.


    You must have the security on IE set very low to get what have working anyway. 


    Tuesday, July 1, 2008 12:37 PM

    Let me post a question regarding this. If there is no application in the path, it gives me an exception--The system cannot find file specified.Now i should check if the apps is present or not. How should i do??



    Thanks in advance. 

    Thursday, July 31, 2008 5:48 AM
  • Hi,

    Follow the given link.. I solved the issue..


    Thursday, December 9, 2010 5:43 AM