title: How to launch a batch file from within an HTA
body: <p>I have a basic HTA in which I am trying to launch a batch file via a button, however when I try to launch the batch file, it does not run.
  When I press the button, a command prompt window launches but does not run the script.</p>
  
  <p>Here is as simple example of the code:</p>
  
  <pre><code>&lt;HTML&gt;
    &lt;HEAD&gt;
      &lt;TITLE&gt;Fix&lt;/TITLE&gt;
    &lt;/HEAD&gt;
    &lt;BODY&gt;
      &lt;FORM&gt;
        &lt;INPUT TYPE="Run" NAME="Button" VALUE="Click"&gt;
  
        &lt;SCRIPT FOR="Button" EVENT="onClick" LANGUAGE="VBScript"&gt;
          Set WshShell = CreateObject("WScript.Shell")
          WshShell.Run "cmd.exe '.\example.bat'"
        &lt;/SCRIPT&gt;
  
      &lt;/FORM&gt;
    &lt;/BODY&gt;
  &lt;/HTML&gt;
  </code></pre>
  
  <p>How can I launch a batch file from the same working directory (or sub-directory) as my HTA?</p>
  
  <p>Thank you</p>