script will not run as a scheduled service unless logged on

Tech-Archive recommends: Speed Up your PC by fixing your registry



Hi

I have run into a really bizzare issue. I have created a vbscript that
refreshes pivot tables and database queries on excel spreadsheets. I can run
the script interactively, and I can run the script as a scheduled job so
long I am logged on.

BTW, is there any difference between calling
CreateObject vs WScript.CreateObject in a vbscript?

The command line of the script is
cscript "J:\Reports\SS Report Engine\GenerateReports.vbs" 0 1

The job is set up in the task scheduler to use the domain administrator
account. The task scheduler log does not report the detail of the error.
From what I can see the script failed to run completely as I create an entry
to the application log on the first line of the script. The exit code is 1.

I have already given Batch user full access to cscript.exe, and I have also
assigned the domain administrator account right to log on as a batch job in
local security policy -> user right assignment.

Any ideas here?

Thanks in advance

CSW


.


Quantcast