dorianwinterfeld has asked for the wisdom of the Perl Monks concerning the following question:

Dear Monks, Apologies in advance for asking a Windows question. I have a Web based Win32::OLE script that uses Excel on the server. It has been working happily for years on a Win2000 server running Excel2000. We recently upgraded to Win2003/Excel2003 and I now get the following error from the script:

Win32::OLE(0.1709) error 0x80070005: "Access is denied" at create_worksheet_lib.plx line 637 eval {...} called at create_worksheet_lib.plx line 637

line 637 is:

$Excel = Win32::OLE->new('Excel.Application', 'Quit') or return 0;

This appears to be a permissions problem as nothing has changed in the script. Any Windows gurus out there that might be able to help trouble shoot this? Thanks in advance - dorian@uaqa.com

Replies are listed 'Best First'.
Re: Win32::OLE question
by CountZero (Bishop) on Jan 10, 2009 at 19:54 UTC
    What were the permissions for the Excel2000 program on the Win2000 server and what are they now for Excel2003 on the Win2003 server? What "user" is the server running as? This may have changed too. Perhaps it has now less/different permissions than before?

    CountZero

    A program should be light and agile, its subroutines connected like a string of pearls. The spirit and intent of the program should be retained throughout. There should be neither too little or too much, neither needless loops nor useless variables, neither lack of structure nor overwhelming rigidity." - The Tao of Programming, 4.1 - Geoffrey James

      Thanks for replying CountZero. Far as I can tell they are the same but I might not be checking in the right place. I right-click on the Excel icon and check properties/security. As an experiment I set everyone to full control but no difference, same error message. I think Perl is running as the IUSR account but I could be wrong there too. Anywhere else I should check permissions?
        May be have a look at the webserver and see as what user it runs? And check the configuration of the webserver to see if it might be another user if it executes external programs (such as perl.exe). Finally check both the permissions of the perl scripts and the excel-files and the directories they live in. They should all be read/write/execute allowed for the webserver.

        CountZero

        A program should be light and agile, its subroutines connected like a string of pearls. The spirit and intent of the program should be retained throughout. There should be neither too little or too much, neither needless loops nor useless variables, neither lack of structure nor overwhelming rigidity." - The Tao of Programming, 4.1 - Geoffrey James

Re: Win32::OLE question
by Bloodnok (Vicar) on Jan 11, 2009 at 00:45 UTC
    I seem to recall encountering something very similar - turns out M$, in their usual manner, had improved, what they choose to call, security between Win2K Server & Win2K3 Server without too much fuss i.e. notification of such changes to us mere users.

    The upgrade automatically installed the improvements - presumably to try and ensure that it [the upgrade] didn't go too smoothly - all too successful in my/our experience.

    I shouldn't have been at all surprised at the eventual outcome ... but was - IIRC it took a couple of days to find and provide a reliable fix for the problem - sadly, the details of which were, other than an unhealthy quantity of expletives, retained by the administrator.

    I dare say some of you other regular visitors to this place of learning may have noticed a certain dislike of M$ from my POV - the above may provide a little background to my disposition...

    A user level that continues to overstate my experience :-))