title: Running cmd from HTA file
body: <p>I am new to scripting ,vbs and HTA commands but I have tryed to create a simple hta folder with some text boxes that represent a date and the current time and I need to run a specific cmd command that takes that date/hour and use them in the specified commad.I think you will understand more when you read the code.I appologise in advance for the mistakes.</p>
  
  <pre><code>&lt;html&gt;
  &lt;head&gt;
  &lt;title&gt;HTA Test&lt;/title&gt;
  &lt;HTA:APPLICATION 
   ID="objTest" 
   APPLICATIONNAME="HTA Test"
   SCROLL="no"
   SINGLEINSTANCE="yes"
  &gt;
  &lt;/head&gt;
  
  &lt;SCRIPT LANGUAGE="VBScript"&gt;
  Sub TestSub
  Dim Shell
  Set Shell = WScript.CreateObject ("WScript.Shell")
  Shell.run WScript "cmd /g applStart.sh SetTime.dat Year.Value-Month.Value-Day.Value-          Hour.Value-Minute.Value-Second.Value"
  Set Shell = Nothing
  End Sub
  &lt;/SCRIPT&gt;
  &lt;body&gt;
   Type in the date you want to jump to:&lt;/br&gt;
  
  &lt;input type="number" name="Day" size="2"&gt;
  &lt;input type="number" name="Month" size="2"&gt;
  &lt;input type="number" name="Year" size="4"&gt;
  &lt;input type="number" name="Hour" size="2"&gt;
  &lt;input type="number" name="Minute" size="2"&gt;
  &lt;input type="number" name="Second" size="2"&gt;
  
  &lt;input id=runbutton  type="button" value="Run Script" name="run_button"   onClick="TestSub"&gt;
  </code></pre>
  
  <p></p>
  
  <p>Hey, thanks for the rapid responses.I have managed to get it to run a part of what i want.The part of settime.sh was actually a command in putty and i didn't quite realise it at the moment of writing but i have managet to get it to a point where it runs putty when I press the run button.Now I need it to type in the command with the values given by the user in the text boxes.This is what I have so far:
      
      
      HTA Test
      
      </p>
  
  <pre><code>&lt;SCRIPT LANGUAGE="VBScript"&gt;
  Sub RunProgram 
      Set objShell = CreateObject("Wscript.Shell")
      objShell.Run "C:\Users\uidv4860\Desktop\Getlogs\PuTTY\putty.exe -load EOBR"
  End Sub
  
  &lt;/SCRIPT&gt;
  &lt;body&gt;
  Type in the date you want to jump to:&lt;/br&gt;
  Day:
  &lt;input type="int" name="fDay" size="2" maxLength="2"&gt;
  Month:
  &lt;input type="int" name="fMonth" size="2" maxLength="2"&gt;
  Year:
  &lt;input type="int" name="fYear" size="4" maxLength="4"&gt;
  Hour:
  &lt;input type="int" name="fHour" size="2" maxLength="2"&gt;
  Minute:
  &lt;input type="int" name="fMinute" size="2" maxLength="2"&gt;
  Second:
  &lt;input type="int" name="fSecond" size="2" maxLength="2"&gt;
  &lt;button onclick="RunProgram"&gt;Run Program&lt;/button&gt; &lt;p&gt;
  &lt;/body&gt;
  </code></pre>