Microsoft KB Archive/315242

From BetaArchive Wiki

Article ID: 315242

Article Last Modified on 12/11/2003



APPLIES TO

  • Microsoft Windows XP Home Edition
  • Microsoft Windows XP Professional Edition



This article was previously published under Q315242

SUMMARY

This article describes how to specify the original folder name for reinstallation of Windows XP during setup if, for example, you need to recover from a failed system drive.

MORE INFORMATION

When you install Windows XP by booting from the Windows installation CD-ROM, Setup does not prompt you for the name of the destination installation folder or allow you to change the name of the destination installation folder.

The default installation folder is the \Windows folder. You cannot change the installation folder during Windows Setup except under the following circumstances:

  • The Windows or %SystemRoot% folder already exists.
  • You perform an unattended installation and specify the TargetPath= parameter in the answer file.
  • You run the Winnt32.exe file from a working copy of Windows XP and change the location in the Advanced Options settings.

Inability to specify the installation folder during Setup is not a problem unless you encounter a system/boot drive failure or unless you must reformat the original boot partition to reinstall Windows XP. For a full system restoration to work properly, you must have Windows XP installed in the same drive_letter:\%SystemRoot% folder as the original, and then perform a full restoration to the original location, which would be on top of the newly installed Windows XP installation.

NOTE: The Windows Backup utility (Ntbackup.exe) does allow you to restore to an alternate location, but the utility does not restore the system state in a form that returns the system to working condition. This is because of the way the system state is collected and then processed later during the restore operation. If your original drive_letter:\%SystemRoot% folder was not the \Windows folder because you upgraded from a Microsoft Windows NT or Microsoft Windows 2000 installation that was located in a different folder, there is no way to perform a full recovery without first getting Windows XP reinstalled in a folder that has the original folder name.

Reinstalling Windows XP in a Folder That Has the Original Folder Name

Use one of the following methods to help you reinstall Windows XP in a folder that has the same name as the original DriveLetter:\%SystemRoot% folder.

Method 1: Use an Answer File in an Unattended Installation

Perform an unattended installation that uses an answer file. An unattended installation allows you to define the installation folder by using the TargetPath=WinDir parameter. You can even accomplish this while you are booting from the Windows XP installation CD-ROM. Follow these steps:

  1. Using Notepad or another text editor, create a file that is named Winnt.sif and that contains the following parameters:

    [Unattended]
    UnattendMode=GuiAttended
    OemPreinstall=No
    TargetPath=OldWinDir <-Match the original folder name

    [data]
    unattendedinstall=yes
    msdosinitiated=0

    Make sure that the file name is Winnt.sif and that the file name does not end with a .txt extension.

  2. Save the Winnt.sif file to a floppy disk, and then boot from the Windows installation CD-ROM while the floppy disk is in the floppy disk drive.

    Windows Setup reads the Winnt.sif file and uses the folder name that is specified in the TargetPath parameter instead of using the default \Windows folder.

For additional information about performing an unattended installation, click the article number below to view the article in the Microsoft Knowledge Base:

314459 How to Perform Unattended Windows Installation from CD-ROM


Method 2: Create a New Windows Folder on a New Partition

Use the Windows Recovery Console to create and format the new system/boot partition, and then create a \Windows folder. Follow these steps:

  1. Boot from the Windows XP installation CD-ROM, and then press R to start Recovery Console.
  2. Run the diskpart command to partition a new drive.
  3. Run the format command to format the partition. Use the following syntax, where FileSystem is FAT, FAT32, or NTFS:

    format drive: /q /fs:FileSystem

  4. Run the md command to create a \Windows folder.
  5. Boot by using the Windows installation CD-ROM, and then perform your new installation.

    When Setup encounters the \Windows folder during text-mode setup, Setup prompts you to overwrite the folder or to press ESC to use a different folder. Press ESC, change the folder name to match your original DriveLetter:\%SystemRoot% folder name, and then continue with the installation.

Method 3: Create a New Windows Folder by Using a Startup Disk from Another Operating System

Using a startup disk from MS-DOS, Microsoft Windows 98, or Microsoft Windows Millennium Edition (Me), create a FAT or FAT32 partition by running the fdisk command on the new system/boot drive, and then create a \Windows folder. Boot the computer by using the Windows XP installation CD-ROM or floppy disks, and then start your new installation.

When Windows XP Setup encounters the existing \Windows folder, Setup prompts you to overwrite the \Windows folder or press ESC to use a different folder. Press ESC and change the folder name to match your original DriveLetter:\%SystemRoot% folder name, and then continue with the installation.

NOTE: If you require a partition that uses the NTFS file system, you can use the convert.exe drive_letter: /fs:ntfs command after the installation is complete but before you perform a restore operation from your last good backup. This procedure retains the NTFS file and folder permissions that were assigned before the drive failure.

Installation floppy disks are available only by download from Microsoft. For additional information about obtaining and using installation floppy disks, click the article number below to view the article in the Microsoft Knowledge Base:

310994 Obtaining Windows XP Setup Boot Disks


Method 4: Create a New Windows Folder on Another Computer

Install or move the drive to another computer, one that runs Windows NT or Windows XP. Create and format a partition, and then create a \Windows folder. Move the drive back to the original computer, and then start Setup from the Windows XP installation CD-ROM or floppy disks.

When Windows Setup encounters the existing \Windows folder, Setup prompts you to overwrite the folder or press ESC to use a different folder. Press ESC, change the folder name to match the original DriveLetter:\%SystemRoot% folder name, and then continue with the installation.

Running a Full System Restoration

After you successfully install Windows XP in a folder that has the original DriveLetter:\%SystemRoot% folder name, run the Windows Backup utility (Ntbackup.exe) to perform a full system restoration (including the system state). Use the most recent backup tape. Specify restoration to the original location to return Windows XP to a working state.


Additional query words: systemroot directory

Keywords: kbinfo kbenv kbsetup KB315242