LeFevre, Ken wrote:

I created a program using ActiveState's perl 5.8.4, compiled it using perlapp 5.3.0 and ran it on Windows 2000 Professional SP4 against Outlook 2000 SR-1 (9.0.0.3821). It runs properly both from a command prompt and as a scheduled task. I released it into production on Windows 2000 server SP4 using the identical version of Outlook 2000. Again, it runs great from a command prompt. When I run it as a scheduled task, however, it dies because it's not able to get the Outlook Application.

Hi there,

I'm afraid I have no solution to your problem, but if you've found help, please share with me, as I code to access Outlook as well.

One of the (unrelated) Outlook issues that I deal with, is that with the latest Outlook, the user is prompted to grant access to the Perl application, when the application starts. Some kind of security measure on Microsoft's part, but it does not happen for Outlook 2000.

Here's the relevant code: Win32::OLE->Initialize(Win32::OLE::COINIT_OLEINITIALIZE); die Win32::OLE->LastError(),"\n" if Win32::OLE->LastError( ); eval { $Outlook = Win32::OLE->GetActiveObject('Outlook.Application') };
        die "Outlook is not installed" if $@;
    unless (defined $Outlook) {
$Outlook = Win32::OLE->new('Outlook.Application', sub {$_[0]->Quit;}); or die "Oops, cannot start Outlook"; <======================= dies here under Win2k srvr as a scheduled task As best I can tell, Outlook is registered the same on both machines. The same dlls exist on both. I even set up the scheduled task to run under the same userid I used when logging on to the server to run the program from the command prompt. My theory is that there is some sort of permissions issue or a difference in the scheduled task environment between the two versions of the Win2k OS, but I'm not succeeded at finding the problem and how to resolve it. I would greatly appreciate any insight or assistance in getting this to run in the new environment. Thanks, Ken

------------------------------------------------------------------------

_______________________________________________
Perl-Win32-Users mailing list
[email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

_______________________________________________
Perl-Win32-Users mailing list
[email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to