Task scheduler will not run a program (.exe)

I am trying to do something very simple - have Outlook 2007 start automatically on my Vista PC at 6:00 AM every morning.  I'm running Vista Business connected to a Windows 2003 domain.  This used to work with no problem when I was running XP.  The task is set up with the following parameters:

Run only when logged on.
Run with highest privileges.
Triggers:  Daily; 6:00 AM every day; stop if the task runs for 30 minutes; enabled.
Action: Start a program; Program/script: "C:\Program Files\Microsoft Office\Office12\OUTLOOK.EXE".
Conditions: Wake the computer (although I have the power settings so that the computer never sleeps); network connection: start only if Any connection is available.
Settings: Allow task to run on demand; Run as soon as possible; If the running task doesn't stop, force it; If the task is already running, do not start a new instance.

The task appears to start, but doesn't actually do anything.  It stops, as it is set to, after 30 minutes. If I run it manually, it doesn't work unless Outlook is already open.  If Outlook is already open, then it opens Outlook again.
LVL 39
Hypercat (Deb)Asked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Mark DamenERP System ManagerCommented:
Hi there

Try this script instead, works on my Vista Ultimate PC where as running Outlook from a command prompt would not work!

Set WshShell = WScript.CreateObject("WScript.Shell")
WshShell.Run "c:\progra~1\MICROS~2\Office12\outlook.exe"

copy the above into notepad and save as "startoutlook.vbs" and then schedule this to run.

good luck

Hypercat (Deb)Author Commented:
Great - I'll give that a try and let you know tomorrow if it works!

Hypercat (Deb)Author Commented:
Didn't work - I did a little troubleshooting and it doesn't even work from the command line.  I'm getting an error that WshShell.Run is not recognized.  I'm not that familiar with VBS scripting, so maybe I haven't installed or enabled something on my Vista machine that should be.  Or maybe it's some type of permissions or access control elevation problem - I'm still struggling with how to deal with some of that stuff.  Anyhow, I tried it with just a regular .cmd batch file and it seems to work.  I'm going to wait until tomorrow to make sure, but if it works I will give you the points for the suggestion that got me moving in the right direction.

Cloud Class® Course: C++ 11 Fundamentals

This course will introduce you to C++ 11 and teach you about syntax fundamentals.

Mark DamenERP System ManagerCommented:
Im not massively familiar with VBS scripting myself, but I have picked up a few tips and tricks which seems to be more reliable than using batch files.

one thing you could try, is this:

Open command prompt
wscript /h:wscript

What this will do is make wscript the default script handler, rather than cscript.

If not, then I am unsure as to why it would not work.  It definately has the correct extension of .vbs ?

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Hypercat (Deb)Author Commented:
Yeah, the extension is correct.  I'll test that command out and see if it fixes it.
Hypercat (Deb)Author Commented:
I still could not get the vbs script to run - not sure why. However, an old style batch file works fine so that's what I'm using. Thanks for the help!
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Windows Vista

From novice to tech pro — start learning today.