Microsoft KB Archive/299044

= How to install additional files during Automated System Recovery =

Article ID: 299044

Article Last Modified on 10/26/2007

-

APPLIES TO


 * Microsoft Windows XP Professional
 * Microsoft Windows Server 2003, 64-Bit Datacenter Edition
 * Microsoft Windows Server 2003, 64-Bit Enterprise Edition
 * Microsoft Windows Server 2003, Datacenter Edition (32-bit x86)
 * Microsoft Windows Server 2003, Enterprise Edition
 * Microsoft Windows Server 2003, Standard Edition (32-bit x86)
 * Microsoft Windows Server 2003, Web Edition

-



This article was previously published under Q299044



SUMMARY
This article describes how to install additional files when you use the Automated System Recovery (ASR) restore feature. Specifically, this article describes how to modify or add the [InstallFiles] section of the Asr.sif file to specify the files and the device drivers that are required during the graphical user interface mode (GUI Mode) ASR Setup that are not included on the Windows Product CD-ROM.



MORE INFORMATION
The ASR restore procedure is made up of two phases: Phase I (Text Mode Setup) and Phase II (GUI Mode Setup). During Phase II of the ASR restore process, there may be programs or device drivers that are required but that are not included on the Windows Product CD-ROM disk. The ASR restore process provides a mechanism to copy these additional files to the destination computer during Phase I. These files will then be available later in the restore process.

The [InstallFiles] section of the Asr.sif file contains the records that identify the device drivers and files and the source and destination to which they are to be copied. Programs may omit the section when they want to specify that the device driver files are not to be copied to the destination computer. Similarly, if the section is present, but it does not contain any records, the drivers are not copied.

The [InstallFiles] section is not required, for example, if the device drivers that are required by the provider program were installed during a typical Microsoft Windows XP installation. Another example is that the recovery program implemented a vendor-specific file copy and installation procedure that did not have to use the semantics that were provided by the recovery device records.

A valid [InstallFiles] section is required during Phase I if ASR is to copy the driver files to a hard disk. A valid driver package must include the driver (.sys) and an installation file (.inf) for the driver to be installed during the Plug and Play section of Phase II. Additionally, this driver package should include a catalog file (.cat) to avoid unsigned driver warnings. All three files must be included in the [InstallFiles] section. Alternatively, third-party drivers can be installed by using a Setup program. In this case, the Setup program itself must be included in the [InstallFiles] section.

NOTE During Phase II, ASR does not access the [InstallFiles] section.

The [InstallFiles] section must use the following syntax. [InstallFiles]Installfile-Key=System-Key,Source-Media-Label,Source-device,Source-File-Path, Destination-File-Path, Vendor-Name, Flags The following list is an explanation of the keys that are used in the [InstallFiles] section:
 * InstallFile-Key - Required

This value is an integer that is more than or equal to one. This key must be unique from all other keys in the [InstallFiles] section. Programs that add entries to the [InstallFiles] section must not generate the InstallFile-Key or the equal (=) sign.
 * System Key - Required

The System Key is an index to the [Systems] section of the Asr.sif. This value identifies what system is being restored. It must be an integer that is more than or equal to one.
 * Source-Media-Label - Required

The Source-Media-Label is used to prompt the user to insert the media if the required media is not present in the Source-Device path. This may also be referred to as the Volume Label.
 * Source-Device - Required

The Source-Device must be a physical device name of the source device because the drive letters on the destination computer are not guaranteed to be the same as that on the original computer when the files in this section are copied. The following strings refer to common installation media:







For all other devices, the full physical device path must be used.
 * Source-File-Path - Required

This string identifies the full path name of the file to be copied, which is relative to the root folder on the source media. For example, if the Driver.sys file that is stored in the I386 subfolder on a CD-ROM must be copied, the source file path for it is I386\Driver.sys. This string must not start with a backslash (\) character.
 * Destination-File-Path - Required

This string identifies the path and file name to which the source file must be copied. Because the only volumes that currently are present are the boot volume and the system volume, the destination must be in one of these volumes. Additionally, ASR will not create any folders. Therefore, you are limited to using folders that exist during this part of Setup. The following strings refer to these folders:

%SYSTEMROOT%: The folder that Windows is installed to.

%TEMP%: %SYSTEMDRIVE%\Temp directory that is created during Setup. For a temporary folder.

Unless there is a specific requirement to install to the Windows (%SYSTEMROOT%) folder, programs typically use the %TEMP% folder.

For example, if the Driver.sys file is copied to the System32 subfolder of the destination computer in the Windows installation folder, the Destination-File-Path is %SystemRoot%\System32\Driver.sys.
 * Vendor-Name - Required

This string is displayed during Text Mode Setup when the user is prompted for the specified file, if it is required.
 * Flags - Required

The Flags key is a combination of one or more of the following values that enables the program to customize the restore-time behavior:

0x00000001 - Prompt For Files Always: This flag causes ASR to always prompt the user for the media before any attempts are made to copy the file. This flag can be used to make sure that the file that is being copied is from the correct media, especially if the file has a common name, such as, Setup.exe, that may exist on some other media that is on the drive. This flag gives the user a chance to make sure that the correct source media is present before ASR copies the file to the destination computer.

0x00000006 - Prompt for Required Files: This flag indicates that this file is critical for the ASR process. ASR does not continue unless this file is copied. This flag must only be set for the appropriate files without which ASR cannot succeed because the user cannot perform a successful recovery unless all these files are present.

0x00000010 - Overwrite if File Already Exists: Specifies whether the file that is being copied must overwrite the file at the target destination if it already exists. This flag is ignored if the flag 0x00000001 is set.

0x00000020 - Prompt if File Already Exists: If this flag is set, the user is prompted if the file that is being copied already exists at the target location.

The following example shows a typical [InstallFiles] section with driver files that must be copied to the destination computer if the computer that is identified by the &quot;1&quot; key in the System section is being restored. [INSTALLFILES] 1=1,&quot;Volume label&quot;,&quot;%FLOPPY%&quot;,&quot;driver.sys&quot;,&quot;%TEMP%\driver.sys&quot;,&quot;Vendor name&quot;,0x00000026 2=1,&quot;Volume label&quot;,&quot;%FLOPPY%&quot;,&quot;driver.inf&quot;,&quot;%TEMP%\driver.inf&quot;,&quot;Vendor name&quot;,0x00000026 3=1,&quot;Volume label&quot;,&quot;%FLOPPY%&quot;,&quot;driver.cat&quot;,&quot;%TEMP%\driver.cat&quot;,&quot;Vendor name&quot;,0x00000026

Notes
 * The driver name of &quot;driver&quot; in the previous example is generic. The actual driver names will vary depending on the manufacturer.
 * During the ASR restore process, there are two directories available to copy the previous drivers to: %SYSTEMROOT% and %TEMP%. It is strongly recommended that you use the %TEMP% directory instead of copying these drivers to the Windows directory.

The following example shows a typical [InstallFiles] section with a program that must be copied to the destination computer if the computer that is identified by the &quot;1&quot; key in the [Systems] section is being restored. 1=1,&quot;Media label&quot;,&quot;%CDROM%&quot;,&quot;appsetup.exe&quot;,&quot;%TEMP%\appsetup.exe&quot;,&quot;Vendor name&quot;,0x00000026 Note The [InstallFiles] section only copies the program files to the destination computer. To run the program files application, an associated entry must be added to the [Commands] section of Asr.sif.

Keywords: kbproductlink kbenv kbinfo KB299044

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.