windows server 2k8 task scheduler cannot open excel

rradnay used Ask the Experts™
I have a simple perl script that opens excel and reads data from one of the tabs. This script works from the cmd line, but will not work when launched via the task scheduler in windows server 2k8. The task will complete successfully with no errors, however the data is not read. My assumption was that the task scheduler is unable to open excel and read the data, but the task does work when I run it from a workstation (Vista). I configured task security to run with highest privileges. I created the task using a domain admin account and the Excel sheet security allows full control for this account. I am also not running this from a network share. I cannot figure out why this works with the same credentials scheduled from a task on a Vista machine, but not via the task scheduler on w2k8 Server. I have no errors to try and troubleshoot the problem. Thanks!
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
George SasIT Engineer
Are you running the service as the same user that has the task sucessfuly executed ?
What if you make a batch file that will run your task from a command prompt ?
I found the solution to this problem. Microsoft support base article states that its not supported to automate office products UI less. It seems that Windows Server 2008 x64 and Excel 2007 enforce the given statement.
But there was a simple solution posted that does not require a registry hack and it worked perfectly (thanks to H Ogawa on MSDN blog):
This solution is ...
ûWindows 2008 Server x64
  Please make this folder.
  ...instead of dcomcnfg.exe.

After creating this folder, the scheduled task opened and read the Excel file same as from cmd line. This simple solution solved all my automation problems.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial