Description of the Netset.exe tool from the Windows 2000 Resource Kit (268781)



The information in this article applies to:

  • Microsoft Windows 2000 Server
  • Microsoft Windows 2000 Advanced Server
  • Microsoft Windows 2000 Professional

This article was previously published under Q268781


Important This article contains information about modifying the registry. Before you modify the registry, make sure to back it up and make sure that you understand how to restore the registry if a problem occurs. For information about how to back up, restore, and edit the registry, click the following article number to view the article in the Microsoft Knowledge Base:

256986 Description of the Microsoft Windows Registry

SUMMARY

This article describes how to use the Netset.exe tool that is included in the Microsoft Windows 2000 Resource Kit.

MORE INFORMATION

Overview and use of Netset.exe

Netset.exe is a stand-alone tool that you can use to add, to remove, or to change the network configuration of a client computer that has Windows 2000 already installed on it. For example, you can use this tool to remove a protocol, such as Internetwork Package Exchange (IPX) or NetBeui, from a client computer that is no longer used on your network. You can also use this tool to change the Internet Protocol (IP) information on a group of servers or workstations without using the user interface.

The Netset.exe tool uses an answer file to perform the configuration of the network components. The procedure follows the same format as an unattended Setup answer file by using the Network section to configure the client.

The following is an example of a Netset.exe answer file that you can use to change the IP address of a client computer.

[Networking]

[NetAdapters]
Adapter01=Params.Adapter01

[Params.Adapter01]
InfID=*

[NetProtocols]
MS_TCPIP=Params.MS_TCPIP

[Params.MS_TCPIP]
AdapterSections=params.TCPIP.Adapter01
DNS=yes
DNSSuffixSearchOrder= mycorp.com, <name>.com
EnableLMHosts=No

[params.TCPIP.Adapter01]
SpecificTo=adapter01
DNSDomain=mycorp.com
DNSServerSearchOrder=10.10.1.5
DHCP=no
IPAddress=10.10.1.100
SubnetMask=255.0.0.0
DefaultGateway=10.10.1.1

[NetServices]
MS_Server=params.MS_Server

[Params.MS_Server]
optimization=balance

[NetClients]
MS_MSClient=Params.MS_MSClient

[Params.MS_MSClient]
				

After you create and save the answer file, run the following command to apply the settings:

Netset.exe path_of_answer_file

To remove a component, build an answer file that lists every component except for the one that you want to remove. This same rule applies when you add a component. When you build the answer file, you must also include the network components that are already installed in addition to the component that you want to add.

Limitations and restrictions

Warning If you use Registry Editor incorrectly, you may cause serious problems that may require you to reinstall your operating system. Microsoft cannot guarantee that you can solve problems that result from using Registry Editor incorrectly. Use Registry Editor at your own risk.

The following restrictions apply when you use Netset.exe:
  • The following registry subkey must exist for Netset.exe to run successfully:

    HKEY_LOCAL_MACHINE\System\Setup\AnswerFileMap

    If you used an unattended Setup to install Windows 2000, this registry key is present. If you did not use an unattended Setup to install Windows 2000, manually create this key. To do this, follow these steps:
    1. Click Start, click Run, type regedt32 in the Open box, and then click OK.
    2. Locate the following registry subkey:

      HKEY_LOCAL_MACHINE\System\Setup

    3. Click Add Key on the Edit menu.
    4. Type AnswerFileMap in the Key Name box, leave the Class box blank, and then click OK.
    5. Click Exit on the Registry menu to quit Registry Editor.
    If the key does not exist, when you try to start Netset.exe, you receive the following error message:
    The settings for the network adapter GUID cannot be set
    Note GUID is the Globally Unique Identifier (GUID) of the network card that is installed on the computer. This GUID contains a number that varies among different computer systems.

    This issue occurs because the Netset.exe utility creates registry subkeys under the HKEY_LOCAL_MACHINE\System\Setup\AnswerFileMap subkey. If the AnswerFileMap subkey is not present, the Netset.exe utility stops responding, and you receive the error message that is discussed earlier. The AnswerFileMap subkey is only present if an unattended answer file was used to install Windows 2000.
  • If you have already configured computer-specific information in the network components, for example, a static IP, the Netset.exe tool removes these configuration settings and replaces them with information that is listed in the answer file.
  • You must have local administrative rights to run Netset.exe or you must use the Runas utility. For information about using the Runas utility, see the Windows 2000 Resource Kit.
Note The Netset.exe tool removes and replaces network configuration settings instead of merging them with existing installations.

If you want to change the IP address of a Windows 2000 client or a Windows 2000 server, you must create a Netset.exe answer file that is similar to the following example:

[Networking]

[NetAdapters]
Adapter01=Params.Adapter01

[Params.Adapter01]
InfID=*

[NetProtocols]
MS_TCPIP=Params.MS_TCPIP

[Params.MS_TCPIP]
AdapterSections=params.TCPIP.Adapter01


[params.TCPIP.Adapter01]
SpecificTo=adapter01
DHCP=no
IPAddress=10.10.0.100
SubnetMask=255.0.0.0
DefaultGateway=10.10.0.2
				

However, when you run the Netset.exe tool by using this answer file, a network configuration is created that only has TCP/IP installed. Any other services or protocols such as the Server or Workstation service are removed. When you create answer files to be used with the Netset.exe tool, you must decide how you want the networking to be configured on the client after the tool has been run.

Answer file keys and sections that are used by the Netset.exe tool

The Netset.exe tool uses an answer file format and parameters that are a subset of the Windows 2000 Setup parameters. These parameters can be found in the Unattend.doc on the Windows 2000 CD. The following sections currently are supported by the Netset.exe tool:

[Identification]

[Networking]

[Netadapters] ; along with all related sub-sections

[NetProtocols] ; along with all related sub-sections

[NetServices] ; along with all related sub-sections

[NetClients] ; along with all related sub-sections
				


Modification Type:MinorLast Reviewed:1/26/2005
Keywords:kbFastTrack kbinfo KB268781 kbAudITPRO