How do I successfully run a task scheduler on SQL server 2008 when I am not logged on.

I created a task in Windows Task Scheduler which calls a vb script  daily. I am on Windows Server 2008 and have admin privileges.
When I set the option to "run the task only when the user is logged on", the script works correctly.
When I set the task to "run whether user is logged on or not" and with the highest privileges, the script does not work correctly.
The script should create excel files and save them in a specified location.
When running the task whether the user is logged or not, the reports are simply not created.

I have been trying to fix this problem for a week with no luck. Any advice would really help...

Thank you!
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

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.

what does the status in the task schedule show?
kmgingeeAuthor Commented:
I am aware that the "tasks will not run interactively". The problem is that the excel files simply do not get created.
The task stays on running mode, until I manually end it.
That only happens when I want it to run "whether the user is logged or not".
Can simply checking that box affect the task in such a way?
Protecting & Securing Your Critical Data

Considering 93 percent of companies file for bankruptcy within 12 months of a disaster that blocked access to their data for 10 days or more, planning for the worst is just smart business. Learn how Acronis Backup integrates security at every stage

I performed the test.bat file shown in the above link.  It works as expected.  therefore, I think there may be something in your script that is running interactively...

Is is possible to edit you script, and place more logging... for example, write to the log as you move through the script... this will help pin-point where the script is stopping..

Maybe out to a text file vs excel... maybe excel can't be used non-interactively?
kmgingeeAuthor Commented:
What confuses me is that if I run the task on Windows XP, it works fine.
Is this a windows server 2008 issue?
yes, sure... windows 2008 is different...

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
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
Microsoft SQL Server 2008

From novice to tech pro — start learning today.