win32all: buggy IE proxy stuff and execScript()

Discussion in 'Python' started by gcash, Aug 7, 2003.

  1. gcash

    gcash Guest

    OK, I was writing code using WIN32ALL to do automation scripts for
    common things we do in IE a lot at work, since grunt-n-point gets
    very boring after a while. I snarfed the code from


    which was very useful. (Thanks, Dave!)

    Finally I get to a beta stage and give it to some of the guys in my
    group to test, and they get "Access is denied" errors executing the
    execScript() method, which runs some javascript in the browser

    They're running pretty much the exact same windows install I am, so I
    beat my head against the wall for a day trying to figure out what's
    going on. Some people can run things as "Administrator", some folks
    can run it as their user, some get it to work under both accounts, and
    some can't get it to work under any account. My machine never had any
    problems, even when I tried to make it break.

    I'm using Win2K Pro SP 4 with all the critical patches, Python 2.2.3,
    and win32all build 156.

    I thought it was strange that I got NO Google hits on my error
    message, and no one else was having the problem.

    I was getting nowhere so I decided to post to comp.lang.python about
    my problem and see if some bright person had an idea. Not only is this
    the most coding I've ever done under Windows, but this is probably the
    most I've USED Windows in years.

    So I whipped up a short script to demonstrate the problem, and since
    no one would have access to our internal sites, I used
    as my example site.

    I wanted to cut'n'paste the error message, so I ran the script on my
    bosses' machine. AND IT WORKED. I changed the site back to our
    internal website and it crashed. Obviously this immediately narrows it
    down to the proxy settings, which I compared to the ones on my

    It turns out that if the site is listed in the "bypass proxy" list, it
    becomes a "Local Intranet" site and you get permission errors NO
    MATTER how you set the permissions for the "Local Intranet" zone. I
    experimented a lot with this, and I got my machine to finally get
    permission errors.

    Obviously a bug, but I didn't find anything in MSDN or MS KB on it.

    Here's what you need to do as a workaround:

    1. Open the "Tools->Internet Options" menu.
    2. Select the "Security" tab.
    3. Click the "Local Intranet" zone icon.
    4. Click the "Sites" button.
    5. Uncheck the "Include all sites that bypass the proxy server"
    6. Hit the "OK" buttons twice.

    That fixes it by putting these sites into the "Internet" zone, and you
    have to do this for the Windows user(s) that will be running IE
    scripts, as it's a per-user thing.

    It seems that it doesn't matter what the permissions are for the
    "Internet" zone, as I cranked those all the way up and didn't have any

    Am I really the first person to run into this?


    The Stones of Ranthenge are written through-and-through, though in an
    ancient script composed solely of decimal points. There are none who
    understand these strange inscriptions outside of one order of Monks,
    who refer to this place as "The Stones That Are Nine-Edge-Down".
    gcash, Aug 7, 2003
    1. Advertisements

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Martin v. =?iso-8859-15?q?L=F6wis?=

    Re: Win32All Crashes Python 2.3?

    Martin v. =?iso-8859-15?q?L=F6wis?=, Aug 5, 2003, in forum: Python
    Martin v. =?iso-8859-15?q?L=F6wis?=
    Aug 5, 2003
  2. Jeff Hinrichs

    Win32All - Services and current path

    Jeff Hinrichs, Aug 25, 2003, in forum: Python
    Jeff Hinrichs
    Aug 25, 2003
  3. Roy H. Berger

    GetEnhMetaFileHeader API and win32all

    Roy H. Berger, Nov 4, 2003, in forum: Python
    Roy H. Berger
    Nov 4, 2003
  4. Neil Hodgson
    Do Re Mi chel La Si Do
    Aug 28, 2005
  5. John Gouda

    js_eval vs execScript

    John Gouda, May 1, 2009, in forum: Ruby
    John Gouda
    May 8, 2009

Share This Page