troubleshooting Question

Run a .vbs Script as a Scheduled task on Windows Server 2008 R2

Avatar of p-plater
p-platerFlag for Australia asked on
SBSVB ScriptWindows Server 2008
15 Comments2 Solutions16504 ViewsLast Modified:
Hello

I am trying to run a /vbs script as a Scheduled task on a Windows Server.
For Testing I have just got the following in the script.


 on error resume next
 
 msgbox "Before Starting Excel"

Set xlApp = Nothing
Set xlApp = GetObject(,"Excel.Application")
if xlApp is Nothing then
      Set xlApp = CreateObject("Excel.Application")
end if
 msgbox "Excel should be running - (Check in the task manager Processes tab)"
xlApp.visible = False

xlApp.visible = true


If I run the script from a short cut on my local machine it runs fine.
If I manualy run it as a scheduled task from my local machine it runs fine.
From my local machine it runs as a scheduled task fine.

If I login to the Server and manualy run the script from a short cut it runs fine.
If I try to run it manualy from the task scheduler on the server nothing happens.
From the Server nothing happens when it is set to run as a scheduled task.

Any Suggestions?
Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 2 Answers and 15 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 2 Answers and 15 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros