Windows IT Pro is the authoritative and independent resource for windows nt, windows 2000, windows 2003, windows xp. Features a collection of resources and magazines for windows IT professionals.
  
  
  Advanced Search 


December 2001

Configuring Laptops to Connect Behind a Proxy Server

RSS
Subscribe to Windows IT Pro | See More Remote Computing Articles Here | Reprints | Or get the Monthly Online Pass—only $5.95 a month!

Download the Code Here

[Editor's Note: Because of space, the listings are abbreviated. To obtain the complete listings, with remarks, go to http:// www.win2000mag.com/articles and enter the InstantDoc ID number in the InstantDoc ID text box.]

I recently had a problem with laptop configurations on my organization's network. We have an internal network behind a proxy server. Laptop users use Microsoft Proxy Server 2.0's client software, Winsock Proxy, to connect to the Internet while on the internal network. When users traveled, they had problems browsing the Internet and sending and receiving email. I tried to teach users to disable the proxy client from the Control Panel applet, then reboot and dial their ISP. Some users seemed unable to follow these instructions.

I knew the Control Panel applet must affect a configuration file or registry entry, so I used Sysinternals' Regmon and Filemon tools to look for the configuration change. I discovered that the file win.ini contains the applicable proxy information. By default, win.ini contains no proxy-related entries after you install the client software. However, when you disable the proxy client from the Control Panel applet the first time, the system creates the following entry in the win.ini file:

[Microsoft Proxy Service] 
Disable=1

When you disable the proxy client, the entry in the Microsoft Proxy Service section sets to Disable=1.

Once I knew where the configuration change took place, I needed to create a script to determine whether the computer was connected to the network and, if so, to enable the proxy client. If the computer wasn't connected to the network, I needed to determine whether the proxy client was disabled. If the proxy client was disabled, I wanted to keep the current configuration. If the client wasn't disabled, I wanted to modify the win.ini file. I created the script in Listing 1 to accomplish these tasks. Although I could have used some of Microsoft's .ini editing tools, I used the KISS (Keep It Simple, Stupid) method instead.

For the script in Listing 1 to work, you must install the proxy client on the laptop, use the Control Panel applet to disable the proxy client, close the proxy client, then reenable the proxy client. These actions add the Microsoft Proxy Service entry in the win.ini file and set the win.ini file for the LAN configuration.

Finally, I ran the setup script in Listing 2 from a network share to install the scripts on the laptops. Listing 3 contains the wininichg.reg file to set the script in Listing 1 to run at logon.

End of Article



Reader Comments
The only drawback is that you rely on the uniqueness of the win.ini across multiple laptops. If a win.ini is different, somehow, from one laptop to another, you may be corrupting a laptop's configutation.

Anonymous User February 07, 2005 (Article Rating: )


You must log on before posting a comment.

If you don't have a username & password, please register now.




Top Viewed ArticlesView all articles
The Memory-Optimization Hoax

Don't believe the hype. At best, RAM optimizers have no effect. At worst, they seriously degrade performance. ...

Command Prompt Tricks

One reader shares his tip for setting up the command prompt to reflect a remote path. ...

WinInfo Short Takes: Week of November 24, 2008

An often irreverent look at some of the week's other news, including a Vista Capable dismissal request, Zune price reductions, Morrow musings, Novell and Microsoft sitting in a tree ... two years later, Yahoo!, IE 6 on Windows Mobile, and so much more ...


Windows OSs Whitepapers Why SaaS is the Right Solution for Log Management

Related Events Check out our list of Free Email Newsletters!

Windows OSs eBooks Understanding and Leveraging Code Signing Technologies

A Guide to Windows Certification and Public Keys

SQL Server Administration for Oracle DBAs

Related Windows OSs Resources Become a VIP member of the Windows IT Pro community!
Get it all with the VIP CD and VIP access. A $500+ value for only $279!

Subscribe to Windows IT Pro!
Solve your toughest technical problems with our experts and access 10,000 + articles online. 30% off

Monthly Online Pass - Only $5.95!
Get instant access to 10,000+ articles from Windows IT Pro Magazine!

TechNet Virtual Labs
Evaluate and test Microsoft's newest products.


Windows IT Pro Home Register FAQ for Windows WinInfo News
Europe Edition About Us Contact Us/Customer Service Media Kit Affiliates / Licensing  
SQL Server Magazine Office & SharePoint Pro Windows Dev Pro IT Job Hound ITTV
IT Library Technology Resource Directory Connected Home Windows Excavator Windows SuperSite 
 
 Windows IT Pro is a Division of Penton Media Inc.
 Copyright © 2008 Penton Media, Inc., All rights reserved. Terms and Use | Privacy Statement | Reprints and Licensing