First, you may have to give the user account the "Act as part of the operating system" right in the Local Security Settings snap-in. The Group Policy on the computer I am using right now doesn't allow me to test this, but the account I used has that right, and the error I received when using an account that didn't have that right seems to point at this issue.

Second, you can get the error message from any Win32 calls pretty easily. Those messages are invaluable in tracking down solutions to problems like this. Often the message itself is worthless, but Googling it will give good answers. Here is the code I used to print the error message to the browser.

use Win32::OLE; use Win32; use CGI; my $q = new CGI; print $q->header; my $browser = new Win32::OLE 'InternetExplorer.Application'; print Win32::FormatMessage( Win32::GetLastError() ); $browser->Navigate("http://www.apple.com", 0, 'xyzzy');

If you run the above code using an account that doesn't have the "act as operating system" right, you should get the error "An attempt was made to reference a token that does not exist."

Good Luck,
digger


In reply to Re^3: Open another IE browser window from CGI by digger
in thread Open another IE browser window from CGI by Olaf

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.