I am trying to run a .vbs
file on every five minutes.
I am trying to do this using windows task scheduler.
In Actions
tab -> New Action
, I select the file ("D:\Documents\FC3 Savegames\FC3.vbs"
) using open file dialog
I have made all other setting properly.
But whenever the task begin, It opens open with
dialog every time.
Once I choose Notepad
to in open with dialog. Then Another dialog opens from Notepad saying Can not find D:\Documents\FC3.txt file. Do you want to create a new file
with three buttons Yes
, No
and Cancel
Help me what is wrong.
I feel that white spaces in the file path causing the problem.
Added later
Well I just fixed this by setting path to shorthand ("D:\Documents\FC3Sav~1\FC3.vbs"). But it still opens "open with" dialog everytime. Now it has two main programs saying "Keep using Microsoft Windows Script Host" and Other Program. This dialog does not open when I run vbs file directly.
Best Answer
Here's what it says about Wscript.exe in the Help file I have:
Here's what it says about Cscript.exe:
Update:
Here's a registry file called "FixVBSFileAssociationsXP.reg" which will fix up the file assocations for you on XP. A different one would be needed for Win 7.
Here's a version called
FixVBSFileAssociationsVista.reg
for Vista and Window 7, which might work on Windows 8, too, but use at your own risk (back up your registry first, if possible):