Task Scheduler - How do you want to open this file

When I manually select to run a scheduled task it prompts me for which program I want to use to open it. if I let the scheduled task run at its scheduled time it shows it has run but doesn't actually do the task in the action.

the action is simply to run a vbs script, in the program/script box contains the full path to the script I wish to run c:\scripts\myscript.vbs

there are no arguments. I know someone is going to say you should put cscript.exe in that box and the script location as the parameter but that's not the point, it produces a command prompt that way which I don't want appearing and this worked fine in windows 7 the way I described above. this was an upgrade from windows 7 to windows 8, so I was hoping everything was going to run fairly smoothly by keeping all my settings, but there are some odd things going on, this being one of them.

how could I make this script run like it used to and without showing the command prompt window. cmd /c cscript c:\scripts\myscript.vbs also doesn't make the command prompt window disappear, it remains until the script finishes.

thanks

Steve

August 19th, 2012 1:33am

Hi,

See the following post regarding running .bat with silent mode.

http://stackoverflow.com/questions/411247/running-a-cmd-or-bat-in-silent-mode

Free Windows Admin Tool Kit Click here and download it now
August 20th, 2012 12:12pm

but I would still require to kick the process off with cmd or cscript which would produce the command prompt window, and if using another script such as bat or vbs this would require running one script simply to run another just to hide a window.

This really isn't good enough Microsoft, not enough testing done here I think. Really what needs answering is "WHY" is running a scheduled task asking me what program if like to use to open it? it has NEVER ever done that before and ive been using scheduled tasks since the early days of 2000, in over 10 years I've never seen this issue!

August 20th, 2012 5:34pm

This is also happening to me after upgrading.  It seems that if you browse for program/script that has a long path i.e. "C:\Program Files (x86)\ABF software\ABF Outlook Backup\3.0\BackupOutlook.vbs" you will get the program selection request.

The workaround I am using is to put the path in the Start in (optional) field: C:\Program Files (x86)\ABF software\ABF Outlook Backup\3.0\ then just put the file in the program/script field: BackupOutlook.vbs

This seems to fix the issue until a fix is released.

Tim


  • Edited by kingdomware Friday, August 24, 2012 6:13 PM typos
  • Marked as answer by Steve Mills Friday, August 31, 2012 2:35 PM
Free Windows Admin Tool Kit Click here and download it now
August 24th, 2012 9:10pm

this doesn't seem to work for me.

in my start in box I have tried "d:\scripts\personal scripts" and d:\scripts\personal scripts

and in the program box I have tried my script.vbs and "my script.vbs" but neither of them work (the former suggests the other half of my file name is an argument so I have to use the quotes)

this sucks

Steve

August 31st, 2012 5:32pm

how weird and incredibly stupid, I just renamed my script file so it doesn't contain spaces - it works.

really poor testing on such a basic thing, and why reprogram a part of the system that worked perfectly fine before, there's no need to even touch that part of windows it worked fine! arrgh!

ahwell, ill have to go and rename all my scripts now so they don't have spaces in them - yawn.

Free Windows Admin Tool Kit Click here and download it now
August 31st, 2012 5:35pm

I am still not able to make it work with the "start in (optional)" or "remove space from file name" suggestions. I still get a prompt. This is highly frustrating. Any other inputs folks. Appreciate it!

  • Proposed as answer by MSNUB Tuesday, September 25, 2012 5:44 PM
  • Unproposed as answer by MSNUB Tuesday, September 25, 2012 5:44 PM
September 20th, 2012 10:06pm

Figured it out: 

Adding the shortcut to a batch file and then launching the batch file from the task resolves the issue.

  • Proposed as answer by MSNUB Tuesday, September 25, 2012 5:45 PM
Free Windows Admin Tool Kit Click here and download it now
September 25th, 2012 8:45pm

this is a ridiculous issue, I wonder how many scheduled scripts and automated processes a large IT department has, we don't have too many its a ball-ache for me to change all these as part of our upgrade process to Server 2012 and windows 8.

Ahwell. thanks for all your replies, I hope this post can help others.

September 26th, 2012 4:48pm

I have changed the dcomcnfg launch and access permissions of Excel to my user id but the very first time it worked and after that it didnt. Tried the start-in optional works very well. Thanks very much 
Free Windows Admin Tool Kit Click here and download it now
November 22nd, 2013 8:11pm

I'm having the same issue. I tried all suggestions and it still prompts me to choose a program to open the file. Annoying and frustrating and completely defeats the purpose of Task Scheduler.
July 23rd, 2014 11:16pm

Thank you very much, i just changed the file to the root of the disc C:/ then,erased the spaces in the file name (A .pls file) and now it works fine! 
Free Windows Admin Tool Kit Click here and download it now
January 31st, 2015 6:27am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics