network configuring through a script

Alex Martelli aleaxit at yahoo.com
Wed Jun 6 08:48:56 EDT 2001


"Francis Meyvis" <francis.meyvis at sonycom.com> wrote in message
news:kqoT6.127$3t.4788 at nreader1.kpnqwest.net...
> Hi,
>
> I've W2k with ActiveState Py 2.1 on my notebook. Python provides some
access
> to COM things.
> I'd like to have scripts that configure my notebook for networking at
home,
> at work, ...
> This requires now going into the dialog for
> - TCP/IP settings to change the IP address to use DHCP or use a fixed IP
> address,

http://cwashington.netreach.net/script_repository/view_scripts.asp?Index=532
&ScriptType=vbscript

shows how to do this in VBScript with WshShell.SendKeys -- not
all that elegant (!!!), but it sort of works.  You can do it
just as well in Python, of course:-).

>    automatic DNS or fixed DNS server
> - IE5 properties/connections to setup Dialup or LAN settings.
> - the IE5 LAN settings allow further automatic settings and proxy server
> settings.
>
> Are these two also possible from within COM?

I don't know of other ways except via sendkeys -- that doesn't
mean such ways AREN'T there, of course, but I'm not familiar
with them.

> Or should one directly modify the registry?

That might well be safest/most robust, yes.


> Can someone point me to MSDN documentation on the inners of these
> configuration dialogs?
> I look in it but do not find anything usefull (could be that the MSDN I'v
> access to is already to old).

The online MSDN is always totally updated -- just visit
http://msdn.microsoft.com/default.asp.  Searching MSDN
is a subtle skill, hard to teach, and I think I'm pretty
good at it, but for all that I often do miss some things:-).


Alex






More information about the Python-list mailing list