title: Running Visual Basic Script as a Scheduled Task asks how I want to Open the File
body: <p>I have created a task in the Task Scheduler that is supposed to execute a .vbs file that I wrote. The problem is that each time the service runs, rather than actually executing the code, I am asked how I want to open the file. How can I stop this? Please do not suggest batch files; I cannot use them for this.</p>
  
  <p><img src="https://i.stack.imgur.com/L8gCM.png" alt="enter image description here"></p>
  
  <p>The command line is <code>"C:\Program Files (x86)\Malwarebytes' Anti-Malware\Malwarebytes Task Scheduler Instructions\Batch Files\MalwarebytesScanAndUpdate.vbs"</code>.</p>
  
  <p>The vbs file's code is...</p>
  
  <pre><code>Dim shell
  Set shell = WScript.CreateObject ("WScript.Shell")
  shell.Run "MalwarebytesUpdate.bat"
  WScript.Sleep 300000 'Sleeps for 5 minutes.
  shell.Run "MalwarebytesScan.bat"
  </code></pre>
  
  <p><strong>Error</strong>
  <img src="https://i.stack.imgur.com/BNeGe.png" alt="enter image description here"></p>