
Setting connection defaults (proxy, home page) based on location
I have a series of related questions regarding
configuration of certain connection settings via VBScript.
Here is the background: I am a corporate user, running
WindowsXP on a laptop. In the office I am connected to
the corporate intranet, and connect through a proxy server
(called "proxy" on port 80). My home page is an internal
portal only accessible inside the network.
At home (my most common secondary location), I connect via
wireless card to a home network that is hardware
firewalled to a DSL connection. There is no proxy.
What I am currently doing (see attached script) is:
(1) Check the location of the computer at startup based
on the availability of network resources
(2) Setting the proxy server setting by direct
manipulation of the registry
(3) Setting the user home page by direct manipulation of
the registry
(4) changing the icon and destination of a shortcut in my
Quicklaunch to indicate whether I am on or off the
corporate net.
(5) If at the office, launching Outlook
Having taught myself just enough VBScript to do this, I
want to know if it is possible to:
(1) Identify the hardware profile from the WSH
(2) Change the proxy setting and/or home page in a more
elegant way than hacking the registry
Also, right now I run my script by putting the .vbs file
in my startup directory. Is there a more elegant way to
initiate the code at startup so that other applications
(such as Weatherbug) are launched only after the proxy
setting has been changed?
Any and all advice is welcome, as I am not really a
programmer, or a Windows guy.
Thanks,
Tobias Zimmerman
P.S. Everything I am doing is "unofficial". I have admin
rights on my own machine, but I cannot use any central
administration scripts to do this, as I am not in the IT
department, and don't have the power to implement such
things. Everything has to be executed locally on the host
machine.
Also, some of the names in the script were changed to
protect the innocent.
|
|
Netconfig.vbs
1K
Download
|