Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 268511
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T23:42:29+00:00 2026-05-11T23:42:29+00:00

I develop a critical application used by a multi-national company. Users in offices all

  • 0

I develop a critical application used by a multi-national company. Users in offices all around the globe need to be able to install this application.

The application is actually a plugin to Excel and we have an automatic installer based on Setuptools’ easy_install that ensures that all a project’s dependancies are automatically installed or updated any time a user switches on their Excel. It all works very elegantly as users are seldom aware of all the installation which occurs entirely in the background.

Unfortunately we are expanding and opening new offices which all have different proxy settings. These settings seem to change from day to day so we cannot keep up with the outsourced security guys who change stuff without telling us. It sucks but we just have to work around it.

I want to programatically detect the system-wide proxy settings on the Windows workstations our users run:

Everybody in the organisazation runs Windows XP and Internet Explorer. I’ve verified that everybody can download our stuff from IE without problems regardless of where they are int the world.

So all I need to do is detect what proxy settings IE is using and make Setuptools use those settings. Theoretically all of this information should be in the Registry.. but is there a better way to find it that is guaranteed not to change with people upgrade IE? For example is there a Windows API call I can use to discover the proxy settings?

In summary:

  • We use Python 2.4.4 on Windows XP
  • We need to detect the Internet Explorer proxy settings (e.g. host, port and Proxy type)
  • I’m going to use this information to dynamically re-configure easy_install so that it can download the egg files via the proxy.

UPDATE0:

I forgot one important detail: Each site has an auto-config “pac” file.

There’s a key in Windows\CurrentVersion\InternetSettings\AutoConfigURL which points to a HTTP document on a local server which contains what looks like a javascript file.

The pac script is basically a series of nested if-statements which compare URLs against a regexp and then eventually return the hostname of the chosen proxy-server. The script is a single javascript function called FindProxyForURL(url, host)

The challenge is therefore to find out for any given server which proxy to use. The only 100% guaranteed way to do this is to look up the pac file and call the Javascript function from Python.

Any suggestions? Is there a more elegant way to do this?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-11T23:42:29+00:00Added an answer on May 11, 2026 at 11:42 pm

    As far as I know, In a Windows environment, if no proxy environment variables are set, proxy settings are obtained from the registry’s Internet Settings section. .
    Isn’t it enough?

    Or u can get something useful info from registry:
    HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Internet Settings\ProxyServer

    Edit:
    sorry for don’t know how to format comment’s source code, I repost it here.

    >>> import win32com.client
    >>> js = win32com.client.Dispatch('MSScriptControl.ScriptControl')
    >>> js.Language = 'JavaScript'
    >>> js.AddCode('function add(a, b) {return a+b;}')
    >>> js.Run('add', 1, 2)
    3
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

We are trying to develop a real-time display system in safety critical domain. (All
I need to develop a file indexing application in python and wanted to know
We develop Win32 application that access to SQL 2005 database through Linq to SQL.
I wish to develop a client-server application in .NET that functions as follows: Clients
I'm using ParallelPython to develop a performance-critical script. I'd like to share one value
My company want to develop an online multitouch scrumboard for our scrumteams. We are
I develop a web application for Tomcat 6, and I'm face to face with
I develop desktop-based WPF-application, that uses SQL Server 2008 R2 Database and ADO.NET Entity
I am going to use Vaadin UI framework to develop web application where indexing
i develop an java desktop application which consome sqlite database. (My pc, windows 7

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.