How to execute an exe using Javascript?
        Posted  
        
            by Karthick
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by Karthick
        
        
        
        Published on 2010-05-05T17:19:29Z
        Indexed on 
            2010/05/05
            17:38 UTC
        
        
        Read the original article
        Hit count: 200
        
JavaScript
|beginner
I need to open an EXE from a folder, when the folder is present, using javascript. I have added the code, but am not able to open the EXE after checking the folder, please share your thoughts.
<html>
    <body>
    <script language="JScript">
    <!--
    function checkfolder()
    { 
        var myObject;
        myObject = new ActiveXObject("Scripting.FileSystemObject");
        if(myObject.FolderExists("\\tmp"))
 {
            alert("tmp Folder Exists");
        }  
 else
 {
           alert("tmp Folder doesn't exist"); 
        }
     }
    -->
    </script>
    Check for folder "tmp"
    <form name="myForm">
    <input type="Button" value="Check Folder" onClick='checkfolder()'>
    </form>
    </body>
    </html>
        © Stack Overflow or respective owner