Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Spawning the Outlook application using Win32::OLE and IIS

by Anonymous Monk
on Jan 12, 2002 at 11:51 UTC ( [id://138239]=perlquestion: print w/replies, xml ) Need Help??

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

I have gotten my code finished that uses Win32::OLE to access Microsoft Outlook on my machine and writes to the command prompt the upcomming week's appointments. I was writing this with the intention of putting it on my webpage that serves off of my personal computer.

I have a Win2K machine and IIS. My code works fine from the command prompt (outputs wonderful HTML tags all over the screen), but when I attempt to access it through the web-browser, the computer issues a beep and the script times out. The code dies on the OLE::New command to open Outlook.
I have set the permissions for IUSR for read/execute access on the WinNT/system32, outlook.exe and the outlook.pst file but have been unable to find a solution. As many other readers, I have searched Google and Microsoft's site extensively and have yet to come to a solution. So I know turn to the wise monks...

Thanks,
-David Weand (email)

  • Comment on Spawning the Outlook application using Win32::OLE and IIS

Replies are listed 'Best First'.
Re: Spawning the Outlook application using Win32::OLE and IIS
by $code or die (Deacon) on Jan 12, 2002 at 19:47 UTC
    Your IUSR_* account needs permission to the instantiate the COM object. I can't remember where you do this, but I remember what the screen looks like. (I've been a windows free zone for a few weeks). Check through the Administrative Tools applets. Also download OLEVIEW from microsoft,

    I wanted to do something similar once, but to instantiate an Internet.Explorer object, the IEXPLORE.exe permissions were irrelevent. You can can grant permissions to the COM objects to users.

    Sorry I can't help any more than that, but I haven't got a windows machine to look this up on at the moment.

    update: Does your script need to run under IUSR_...? Do you really want everyone to have access to your calendar or do you want to password protect it? If you want it password protected, you can untick Anonymous access in IIS, and use Basic/NTLM authentication. That might be a temporary workaround. But since this is more of a Windows/IIS problem, you'll find more help in a related news://microsoft.public.* newsgroup, for example: IUSR_... persmissions problem - Pls Help!

    Simon Flack ($code or die)
    $,=reverse'"ro_';s,$,\$,;s,$,lc ref sub{},e;$,
    =~y'_"' ';eval"die";print $_,lc substr$@,0,3;
      Your IUSR_* account needs permission to the instantiate the COM object.

      Or you need access to someone who does have permission. I've seen a scheme based on having the web server queue files to another process. The second process ran under a different (more privileged) user account, and had full access to COM and DCOM. This split was some for real or perceived security reasons. (It's been a couple of years, and I've lost the details.)

      A benefit of staging things this way is that you get a complete, file-based history for debugging.

        Yes, that might be a better way of doing it. I've done something similar, setting up a SOAP server using Win32::Daemon and SOAP::Lite.

        Simon Flack ($code or die)
        $,=reverse'"ro_';s,$,\$,;s,$,lc ref sub{},e;$,
        =~y'_"' ';eval"die";print $_,lc substr$@,0,3;
Re: Spawning the Outlook application using Win32::OLE and IIS
by thor (Priest) on Jan 12, 2002 at 20:15 UTC
    I might be off here, but have you tried to save the output of your script to a file and then open your file through a browser? Doing this will ensure that your script is outputting valid HTML. If it's not, I think it might be easier to debug (hmmm, why doesn't this work...what the hell is a <@#$%!> tag...etc)

    thor

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://138239]
Approved by root
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others perusing the Monastery: (7)
As of 2024-04-19 12:16 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found