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 38
Hypercat (Deb)Asked:
Who is Participating?

[Webinar] Streamline your web hosting managementRegister Today

x
 
Mark DamenConnect With a Mentor ERP 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 ?
0
 
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!

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

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

good luck
mark

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

Deb
0
Learn to develop an Android App

Want to increase your earning potential in 2018? Pad your resume with app building experience. Learn how with this hands-on course.

 
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.

Deb
0
 
Hypercat (Deb)Author Commented:
Yeah, the extension is correct.  I'll test that command out and see if it fixes it.
0
 
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!
0
All Courses

From novice to tech pro — start learning today.