Microsoft KB Archive/321070

From BetaArchive Wiki

Article ID: 321070

Article Last Modified on 10/30/2006



APPLIES TO

  • Microsoft Windows XP Professional
  • Microsoft Windows XP Home Edition



This article was previously published under Q321070

For a Microsoft Windows 2000 version of this article, see 287506.

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


IN THIS TASK

SUMMARY

REFERENCES

SUMMARY

This step-by-step article describes how to reverse the changes that are made when you run either the Sysprep utility (Sysprep.exe) or the Riprep utility (Riprep.exe) on a host computer to prepare it for cloning. You may want to reverse the changes that Sysprep made to the host computer's registry so that the Mini-Setup Wizard does not run when you restart the computer. After you reverse the changes, the host computer is returned to the state it was in before you used Sysprep or Riprep.

You can use the 4 procedures that are described in this article if the Mini-Setup Wizard causes the original computer to stop responding (hang), which prevents Setup from completing. You can also use this procedure to troubleshoot the root cause of the issue that is preventing Sysprep from completing successfully. After you find the cause of the issue, you can run Sysprep or Riprep again.

You may also want to use this procedure if you accidentally run Sysprep or Riprep against a production computer but you do not want to change the Security IDs (SIDs) or any of the configurable options for which Mini-Setup Wizard prompts you to change when you restart the original computer.

If you run Sysprep or Riprep on a source computer, it changes the following registry values:

  • HKEY_LOCAL_MACHINE\SYSTEM\Setup

    • Cmdline:REG_SZ:setup -newsetup -mini
    • MiniSetupInProgress:REG_DWORD:0x1
    • SetupType:REG_DWORD:0x1
    • SystemSetupInProgress:REG_DWORD:0x1


    NOTE: Riprep or Sysprep adds the -mini parameter.
  • HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Session Manager

    SetupExecute:REG_MULTI_SZ:setupcl.exe

After you restart the computer, Setupcl.exe automatically assigns new SIDs to the computer, and then starts the Mini-Setup Wizard to complete the setup procedure.

back to the top

How to Rename the Current System Hive

If you want to prevent new SIDs from being assigned and the Mini-Setup Wizard from running, you must either modify the Windows XP registry to reset the values back to the original values, or you must rename and replace the %SystemRoot%\System32\Config\System file from the %SystemRoot%\Repair or the %SystemRoot%\Regback folder:

  1. Insert the Windows XP installation CD-ROM, and then start the computer to Recovery Console.
  2. In Recovery Console, log on to the computer, locate the %SystemRoot%\System32\Config folder, and then rename the System file to System.mini.

back to the top

How to Copy the System Hive from the Repair Folder

  1. Copy the %SystemRoot%\Repair\System file to the %SystemRoot%\System32\Config folder.
  2. Exit Recovery Console, and then restart the computer into the original operating system by using the previous System hive.


NOTE: This step may require you to reactivate Windows XP. If you are prompted to reactivate Windows XP, follow the steps that are provided.

This hive is a temporary System hive that does not require any installed programs or services; however, you have to use it to start the computer so that you can make the changes described in the following section.

back to the top

How to Load and Edit the Renamed System Hive

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.

  1. Start Registry Editor (Regedit.exe), and then click the HKEY_LOCAL_MACHINE key.
  2. On the File menu, click Load Hive, open the %SystemRoot%\System32\Config\System.mini registry file, and then give this file a different name, for example, Test.
  3. Note the value for the Current: REG_DWORD registry value in the following registry key:

    HKEY_LOCAL_MACHINE\Test\Select

    NOTE: This value determines the ControlSet00x value that is loaded when you start the computer. You must modify this control set.
  4. Locate and then click the following registry key, where x is the value in Current:REG_DWORD: value that you noted in the previous step:

    HKEY_LOCAL_MACHINE\Test\ControlSet00x\Control\Session Manager

  5. Double-click the following registry value:

    SetupExecute:REG_MULTI_SZ:Setupcl.exe

  6. Remove Setupcl.exe, and then click OK.
  7. Locate and then click the following registry key:

    HEY_LOCAL_MACHINE\Test\Setup

  8. Change the values of the following registry settings from 0x1 to 0 (zero):
    • MiniSetupInProgress:REG_DWORD:0
    • SetupType:REG_DWORD:0
    • SystemSetupInProgress:REG_DWORD:0


  9. Double-click the following registry value:

    Cmdline:REG_SZ:setup -newsetup -mini

  10. Remove the %SystemRoot%\System32\Oobe\Msoobe.exe /f entry, and then click OK.
  11. Locate and then click the following registry key:

    HKEY_LOCAL_MACHINE\Test

  12. On the File menu, click Unload Hive, and then click Yes.
  13. Quit Registry Editor.

back to the top

How to Rename the System Hive File to Its Original Name

  1. Insert the Windows XP installation CD-ROM, and then start the computer to Recovery Console.
  2. Locate the %SystemRoot%\System32\Config folder, rename the System file to System.erd, and then rename the System.mini file to System.
  3. Quit Recovery Console, and then restart the computer to the original operating system.

back to the top

Troubleshooting

After you complete the procedures that are described in this article, the Windows configuration is returned to that state that it was in before you ran Sysprep or Riprep. However, if either "OemPnPDriversPath=" or "InstallFilesPath=" was specified in the Sysprep.inf file, you must remove the values that Sysprep added from the registry:

  • If "OemPnPDriversPath=" was used in Sysprep.inf, remove the values that Sysprep added to the following default entry:

    HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\DevicePath:REG_EXPAND_SZ:%SystemRoot%\inf

  • If "InstallFilesPath=" was used in Sysprep.inf, remove the values that Sysprep added to the following default entry, where CD_ROM is the local CD-ROM drive letter:

    HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Setup\SourcePath:REG_SZ:CD_ROM_drive:

back to the top

REFERENCES

For additional information about Sysprep, click the article numbers below to view the articles in the Microsoft Knowledge Base:

282190 Description of New Features in Sysprep for Windows XP


302577 How to Use Sysprep.exe to Automate Windows XP Deployment


For additional information about installing or using the Windows XP Recovery Console, click the article number below to view the article in the Microsoft Knowledge Base:

307654 HOW TO: Install and Use the Recovery Console in Windows XP


For additional information about editing, backing up, and restoring the registry in Windows XP, click the article number below to view the article in the Microsoft Knowledge Base:

322756 HOW TO: Backup, Edit, and Restore the Registry in Windows XP


back to the top


Additional query words: mini setup

Keywords: kbhowto kbhowtomaster KB321070