C# Tutorials and offshore development in India
Tutorials Resources Forum Reviews Communities Interview Jobs Projects Training Videos


Prizes & Awards
My Profile



Active Members
TodayLast 7 Days more...


Birthday Greetings
Learn Windows 7: Accelerator feature in Internet Explorer 8   This article explains how to make use of Accelerator feature available in Internet Explorer 8. Accelerator feature provides preview information with out navigating to other Windows.



Resources » Code Snippets » Javascript »

Run exe file using Java Script


Posted Date: 10 Jul 2008    Resource Type: Code Snippets    Category: Javascript
Author: www.DotNetVJ.comMember Level: Diamond    
Rating: 1 out of 5Points: 10



This sample code shows how to execute a program from Javascript:

<html>
<head>
<script language="JavaScript" type="text/javascript">
MyObject = new ActiveXObject( "WScript.Shell" )
function RunExe()
{
MyObject.Run("file:///C:/Program%20Files/EditPlus%203/editplus.exe") ;
}

</script>
</head>
<body>
<h1>Run a Program</h1>
This script launch the file any Exe File<p>
<button onclick="RunExe()">Run Exe File</button>
</body>
</html>


Attachments

  • Run exe file in Java Script (19547-101956-Run_Exe.html.bak)




  • Responses to the resource: "Run exe file using Java Script"
    Author: www.DotNetVJ.com    14 Jul 2008Member Level: Diamond   Points : 0
    Hi,
    I would like to know why this post is rejected.
    Thanks -- Vj



    Author: Tony John    25 Jul 2008Member Level: Diamond   Points : 1
    This code snippet was deleted because the attachment was not opening. I have edited the post and have inserted the content of your attachment directly in to the post. The resource is restored.

    - Tony


    Author: Ralph logan    17 Aug 2009Member Level: Bronze   Points : 1
    Downloaded the script to run an exe file. My question is if there is a way to aviod having to respond to the ActiveX message every time this script is run?


    Feedbacks      
    Popular Tags   What are tags ?   Search Tags  
    Sign In to add tags.
    Run exe file using Java Script  .  Run exe file in Java Script  .  Run exe from javascript  .  

    Post Feedback


    This is a strictly moderated forum. Only approved messages will appear in the site. Please use 'Spell Check' in Google toolbar before you submit.
    You must Sign In to post a response.
    Next Resource: Display Message on MouseOver
    Previous Resource: Refresh Parent page when Child window closes
    Return to Resources
    Post New Resource
    Category: Javascript


    Post resources and earn money!
     
    More Resources



    About Us    Contact Us    Privacy Policy    Terms Of Use