benlaw has asked for the wisdom of the Perl Monks concerning the following question:

Hi all, i'd like auto-config all my setting in WIN2k server, such as DNS server, DHCP server,WINS server.. to decrease the effort for system administration, are they reasonable ?? Is there any pre-defined modules can do these? Thx a lot

Title edit by tye

  • Comment on Could PERL auto-config Win2K network settings?

Replies are listed 'Best First'.
Re: Could PERL do these (a rookie question)?
by Zaxo (Archbishop) on Oct 25, 2001 at 14:01 UTC

    Check your perl docs for information on Win32 modules. I think Win32::AdminMisc will get you started.

(tye)Re: Could PERL auto-config Win2K network settings?
by tye (Sage) on Oct 25, 2001 at 19:55 UTC

    It looks like Win2K has moved all of these settings to be under HKEY_LOCAL_MACHINE\ SYSTEM\ CurrentControlSet\ Services\ Tcpip\ Parameters\ Interfaces, so you could probably use Win32::TieRegistry to set those and then reboot.

    I've done this quite successfully under WinNT. But I also took a snapshot of the Registry, changed the settings via the approved API, then compared the resulting Registry to the snapshot so that I was pretty sure I was updating all of the right stuff.

    So I strongly suspect that the part of the Registry I noted above is all you need to mess with, but I haven't validated that and so don't blame me if you try it and it breaks something, especially if you don't validate it yourself first. (:

            - tye (but my friends call me "Tye")
      oh, registry can do all the things instead of administrative tools, this is really wonderful thing! is there any site describe more depth on this?

        The Registry is simply a central place to persist configuration information (mostly). So anything configurable about any part of WindowsNT (or later) will usually be read from the Registry when the computer is booted.

        So if you want to change nearly any configuration options, you can usually figure out (but not often find documentation on) how to change some values in the Registry to accomplish that the next time the computer reboots.

                - tye (but my friends call me "Tye")
Re: Could PERL auto-config Win2K network settings?
by RayRay459 (Pilgrim) on Oct 25, 2001 at 21:47 UTC
    benlaw
    I have used TieRegistry to tap into the registry and update network information. I have only used this on NT4 though. Its fairly easy to use though.
    Good luck!
    Ray