title: Running .vbs through task Scheduler
body: <p>I am trying to run a vbs script through Task Scheduler. The code for the vbs script is </p>
  
  <pre><code>Dim ObjExcel, ObjWB
  Set ObjExcel = CreateObject("excel.application")
  'vbs opens a file specified by the path below
  Set ObjWB = ObjExcel.Workbooks.Open("FilePath\CombinePDFs.xlsm")
  'either use the Workbook Open event (if macros are enabled), or Application.Run
  
  ObjWB.Close False
  ObjExcel.Quit
  Set ObjExcel = Nothing
  </code></pre>
  
  <p>Then the Action in Task Scheduler is: </p>
  
  <pre><code>Program/Script: "FilePath\CombinePDFS.vbs"
  </code></pre>
  
  <p>With no added argument or "Start in." Trying to run this had caused it to run 20 minutes so far and it doesn't look like it's ever going to stop. It usually takes 1 minute to run.</p>
  
  <p>I've read online that people say I need to be executing this in Cscript, but I have done no command coding and so I can't figure out where the CScript.exe file is supposed to go in the "Edit Action" box. Any clarification on where I need to put the Cscript.exe would be most helpful, or if you see another problem let me know. </p>