Re: Script to Change Link Speed and Duplex

From: Torgeir Bakken (MVP) (Torgeir.Bakken-spam_at_hydro.com)
Date: 02/26/04


Date: Thu, 26 Feb 2004 20:50:35 +0100

JLL wrote:

> I am trying to write or find a script that will set the
> linkspeed and duplex on a system. I am unable to find
> what class is it set in or if it is even possible. I
> would think that it is possible as I can set the ip
> address and various other settings. Any info on this
> would be appreciated.

Hi

There is not a standard script interface for this, it is up to each NIC
manufacturer to handle this as they see fit. Check if your NIC manufacturer
have e.g. a command line based utility or a WMI provider you can use.

>From http://www.intel.com/support/network/adapter/wmi/index.htm
you will e.g. find the following:

Intel PRO Network Adapters - Set Speed and Duplex WMI Script User’s Guide
http://www.intel.com/support/network/adapter/wmi/fdsug.htm

Forcing Speed/Duplex Script
http://www.intel.com/support/network/adapter/wmi/fsdset.htm

You will need to run NcsWmiCo.exe to install this Intel PRO NIC WMI provider
(if I am not mistaken, it is in the PRO2KXP.EXE file).

Alternatively, use a registry monitoring tool (see below) to detect registry
changes when you change the NIC properties and see if you can do the same
changes from a script successfully (you would most likely need a reboot to
see the change).

RegMon (real-time monitoring)
http://www.sysinternals.com

InCtrl5:
It will make an snapshot of registry and files before you do an
installation or a configuration, and will report the differences
after the install/configuration.

Search for InCtrl5 here:
http://www.xpefiles.com

And from a post by ItIsMillerTime4u in the WindowsScript forum in this thread:
http://groups.msn.com/WindowsScript/general.msnw?action=get_message&mview=0&ID_Message=8650

<quote>
This varies on the NIC that you have on the machine. The speed of the NIC
is determined by registry settings on each machine you can use Regmon.exe
from www.sysinternals,com to find out exactly what registry value changes
when you change the speed, and then write a script that will change this
registry value on the specified system.

Also you might want to know that the speed is set by the manufacture of
the NIC driver in its associated .inf file. If you want to to change it
on a machine that you plan on creating an image off of for deploying
around the network (using Norton Ghost for example), you should change
the settings in the appropiate .inf file. After doing so you will need
to delete the .pnf file that goes along with that .inf file. Then reboot
your system. When you r computer comes back up it should see the .inf
file and see that it doesn't have the matching .pnf thus recreating it.

You will have to repeat this proccess for every NIC's .inf file that
would expect to see throughout the network. This is the best of doing
this, because when the Windows 2000/XP system does it Auto-detect on the
NIC it will set the speed to whatever is specified in that .inf file.

After your done doing editing all the .inf files, the computer should be
ready to create an image off of.

You may want to do this anyways even if you end up change the speed via
a script on all of the systems anyway, in case Windows 2000/XP attempts
to reload the driver on the any NIC's that are installed on each system.
</quote>

--
torgeir
Microsoft MVP Scripting and WMI, Porsgrunn Norway
Administration scripting examples and an ONLINE version of the 1328 page
Scripting Guide: http://www.microsoft.com/technet/scriptcenter


Relevant Pages

  • Re: USB Printer Problem
    ... Any pointers on what registry data I ... >> as from your custom INF file import. ... >>> when I manualy install it using "Add Printer". ... >>>> printer driver files to appropriate windows directories. ...
    (microsoft.public.windowsxp.embedded)
  • Re: Display driver installation problem!
    ... I deleted the registry in the pre-FBA image. ... Still the most confusing part to me is the same INF file is being used to ... #-166 Device install function: DIF_SELECTBESTCOMPATDRV. ... #I060 Set selected driver. ...
    (microsoft.public.windowsxp.embedded)
  • Re: Script to Change Link Speed and Duplex
    ... >> I am trying to write or find a script that will set the ... >You will need to run NcsWmiCo.exe to install this Intel ... use a registry monitoring tool (see ... >the NIC driver in its associated .inf file. ...
    (microsoft.public.windows.server.scripting)
  • Re: Undoing Registry Tweak
    ... > That script is actually an .inf file. ... > I would not use an inf file for this sort of thing. ... Then, if needed, you can simply merge the exported .reg file, to restore ... >> I have a couple of registry tweaks for speeding up my internet ...
    (microsoft.public.windowsxp.newusers)
  • Re: Installing Driver from app in Windows 98
    ... the other for the updating of the registry. ... > Isn't there a third section that referes to these two? ... > So you can right-click any INF file and choose Install from the context ...
    (microsoft.public.vc.language)

Quantcast