8 Replies Latest reply on Jun 19, 2008 9:58 PM by roshan_thomas_mathew

    Run Batch File From Air Application

      Hi There

      I like to know if anyone attempted to run a batch file from Air Application.

      I have created a sample Air Application with HTML that when clicked on the button should execute a batch file.

      I have pasted the code below, Any Help Appreciated.


      <html xmlns="http:/www.w3.org/1999/xhtml">
      <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
      <title>Run This Batch File</title>
      <style type="text/css">
      body {
      background-color: #999999;
      <script type="text/javascript">
      function runApp(which) {
      WshShell = new ActiveXObject("WScript.Shell");
      WshShell.Run (which,1,false);

      <body leftmargin="0" topmargin="0">
      <table width="200" border="0" cellpadding="0" cellspacing="0">
      <td width="66" height="20"> </td>
      <td width="66"> </td>
      <td width="68"> </td>

      <td> </td>
      <td align="center"><img src="Icon1.gif" width="30" height="30" border="0" onClick="runApp('file://RunMe.bat');" /></td>
      <td> </td>
      <td height="20"> </td>
      <td> </td>
      <td> </td>