System Preparation Tool Does Not Update the Host Name

ID: Q246793


The information in this article applies to:
  • Microsoft Windows NT Server version 4.0

IMPORTANT: This article contains information about editing the registry. Before you edit the registry, make sure you understand how to restore it if a problem occurs. For information about how to do this, view the "Restoring the Registry" Help topic in Regedit.exe or the "Restoring a Registry Key" Help topic in Regedt32.exe.

SYMPTOMS

When you use System Preparation Tool for Microsoft Windows NT Server 4.0 to create a duplicate computer configuration (an image), the host name is not updated on the clone computer. As a result, all of the computer images produced from the master computer have the same Domain Name Server (DNS) host name.


CAUSE

This behavior occurs because the System Preparation Tool for Windows NT Server 4.0 does not support a parameter for specifying the host name.


RESOLUTION

WARNING: Using Registry Editor incorrectly can cause serious problems that may require you to reinstall your operating system. Microsoft cannot guarantee that problems resulting from the incorrect use of Registry Editor can be solved. Use Registry Editor at your own risk.

For information about how to edit the registry, view the "Changing Keys and Values" Help topic in Registry Editor (Regedit.exe) or the "Add and Delete Information in the Registry" and "Edit Registry Data" Help topics in Regedt32.exe. Note that you should back up the registry before you edit it. If you are running Windows NT, you should also update your Emergency Repair Disk (ERD).

To resolve this behavior, create a batch file to change the host name in the registry so it matches the computer name, and place the batch file in the RunOnce registry key of the master computer. Follow these steps:

  1. On the master computer, in Notepad, create a Host.cmd file that contains the following text:


  2. 
    start %SystemRoot%\System32\Regchg.exe
    System\CurrentControlSet\Services\Tcpip\Parameters Hostname REG_SZ
    %computername% 
  3. Copy the Regchg.exe utility to the %SystemRoot%\System32 folder of the master computer.

    NOTE: The Regchg.exe utility is in the Windows NT Server 4.0 Resource Kit.


  4. Add the Host.cmd file to the RunOnce key in the registry of the master computer:

    1. Start Registry Editor (Regedt32) and locate the following key:


    2. 
      HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\RunOnce 
    3. Add a new registry value to run the Host.cmd file:


      1. On the Edit menu, click Add Value.


      2. Type an arbitrary value name (such as Host) in the Value Name box.


      3. In the Data Type box, click REG_SZ, and then click OK.


      4. In the String box, type the path to the Host.cmd file, and then click OK.


    4. Quit Registry Editor.


    NOTE: Do not restart the master computer after you add this value to the RunOnce key. When you restart the computer, the Host.cmd batch file runs after you log in and the operating system removes the value you just added to the RunOnce key.


  5. Use System Preparation Tool for Windows NT Server 4.0 to create a clone of the master computer.


  6. Log on to the clone computer.

    The Host.cmd file runs, changing the host name so it matches the computer name.


  7. (Recommended) After you log on to the clone computer, run the Rdisk utility with the /s option to update the Security Accounts Manager (SAM) and the security hives in the Repair folder of the clone computer.



MORE INFORMATION

When you use the System Preparation Tool for Windows NT 4.0 to duplicate a computer, the security identifiers (SIDs) in the Repair folder of the master computer are also duplicated to the clone computer, which can cause problems if you attempt to use the Emergency Repair Disk on the clone computer. Immediately after you use the System Preparation Tool for Windows NT 4.0, run Rdisk /s to update the SIDs in the Repair folder on the clone computer.

For additional information, please see the following article in the Microsoft Knowledge Base:

Q183253 Problems After Using Rdisk on a Computer Cloned with System Preparation Tool for Windows NT 4.0
For additional information about the syntax of the Regchg.exe command, please see the following article in the Microsoft Knowledge Base:
Q171591 Syntax Examples of Windows NT Server Registry Resource Kit Utilities
For additional information about the Windows NT 4.0 System Preparation Tool, please see the following article in the Microsoft Knowledge Base:
Q200567 Answer File Parameters for Windows NT 4.0 System Preparation Tool

Additional query words: clone duplicate Sysprep same DNS

Keywords :
Version : winnt:4.0
Platform : winnt
Issue type : kbprb


Last Reviewed: November 23, 1999
© 2000 Microsoft Corporation. All rights reserved. Terms of Use.