I've got a short vbs script that I need to run daily.

Here is the vbs script:

Dim URL 
URL = "C:\Users\jp2code\Coding\DailyEmail.html"

Dim objShell 
set objShell = CreateObject("Shell.Application")
objShell.ShellExecute "chrome.exe", URL, "", "", 1

I can double-click the file in Windows Explorer, and the HTML file will open up in Chrome. Just like I want.

I have it specified to run as a daily task in Task Scheduler, but every day Windows 10 barfs and can't figure out what to do with the vbs file:


It would be faster, at this point, to just have a Message Box pop up, but I would like to get it fixed.

Has anyone found a way to tell Windows 10 how to handle things like this?

It is almost like this whole OS was designed to be run on a tablet {cough!}.

  • for the record, you can right-click scheduled tasks and run them on-demand instead of waiting for the interval to pass.
    – seagull
    Jan 11, 2016 at 22:56

1 Answer 1


To launch a VBS script from the Task Scheduler, you need to specify which scripting host engine to run it with.

Using cscript ("Console Script") is probably most appropriate for tasks.

So set the "Start a program" under "Actions" to cscript and set the "Add arguments" to your script path/name (e.g.: c:\pathTo\yourScript.vbs).

  • Windows 10 cannot seem to find either cscript or wscript (from your link). Is that something additional that needs to be installed?
    – jp2code
    Jan 11, 2016 at 23:09
  • 1
    @jp2code It should be C:\Windows\System32\cscript.exe
    – DavidPostill
    Jan 11, 2016 at 23:36
  • an exemple using .py script: stackoverflow.com/a/44873579/1486850
    – JinSnow
    Jul 2, 2017 at 20:46

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .