Issue
Cannot run a simple .vbs script using Windows Task Scheduler. The script runs just fine if launched manually. However, if it’s run from a scheduled task as a currently logged on user, Open With dialogue opens. If it’s run from a scheduled task under a different user account, nothing happens and task stays in Running state indefinitely.
Resolution
The issue was resolved by running the script via wscript.exe executable, instead of trying to launch .vbs directly. To do this, configure the scheduled task’s Actions tab as follows:
- Action: Start a program
- Program/script: C:\Windows\System32\wscript.exe
- Add arguments (optional): “C:\Scripts\script.vbs”
November 2019
Windows Server 2016
Leave a Reply