Automating ASR

Posted on 2007-10-01
Last Modified: 2008-09-22

Does anyone know how to automate the ASR process? It's such a pain trying to manually make ASRs during the weekly maintenance activities in our environment.

Question by:AlwaysAlert
    LVL 8

    Expert Comment

    by:Bradley Haynes
    Re: How to automate ASR restore process
    Create a Cron job; or in windows set up a schedule task.
    If you like you can follow these instructions for automating the ASR  restore points -  I found in a w2k3 forum:

    You may follow these steps:

    Setting up the RIS server to use ASR
    1. Set up the RIS server to support automation of the F12 PXE boot that
    executes the ASR restore option. To do this, follow these steps:
    a. Verify the BIOS boot order on the RIS server and on each of the client
    computers. Position the hard disk first in the boot order, and then
    position the PXE option second in the boot order.
    b. Rename the current file as Startrom.bak (for backup
    purposes). This file is located in the \\RISserver\Reminst\OSChooser\I386
    folder on the RIS server,
    c. Rename the Startrom.n12 file as This file is located in
    the \\RISserver\Reminst\OSChooser\I386 folder on the RIS server. The new
    version of automates the process when the user presses F12 to
    prompt Trivial File Transfer Protocol (TFTP) for the initial download.

    2. Make backups of the following files, and then rename them in the
    \\RISserver\Reminst\OSChooser\Language folder:
    ? Rename Welcome.osc as Welcome.bak.
    ? Rename Login.osc as Login.bak.
    ? Rename Install.osc as Install.bak.
    ? Rename Warning.osc as Warning.bak.

    Note As a best practice, make a backup copy of each .osc file before you
    make any changes in the \\RISserver\Reminst\OSChooser\Language folder.
    3. Edit the following .osc files on the RIS server: a. Welcome.osc <OSCML>
    <TITLE> Client Installation Wizard
    <FOOTER> [ENTER] continue </FOOTER>
    <BODY left=5 right=75>

    Welcome to the Client Installation Wizard. This Wizard helps you quickly
    and easily set up a
    new operating system on your computer. You can also use this Wizard to
    keep your computer
    up-to-date and to troubleshoot computer hardware problems.

    In the Wizard, you are prompted to use a valid user name, password, and
    domain name to log on
    to the network. If you do not have this information, contact your
    network administrator
    before continuing.
    Copy this code to the \\RISserver\Reminst\OSChooser folder, and then save
    the file as Welcome.osc. After you add "META ACTION=AUTOENTER" to this
    code, the user does not have to press ENTER in the Client Installation
    Wizard because this action is automated.
    b. Login.osc <OSCML>
    <TITLE> Client Installation Wizard
    <FOOTER> [ENTER] continue [ESC] clear [F1] help [F3]
    restart computer</FOOTER>
    <BODY left=5 right=75>

    Type a valid user name, password, and domain name. You may use the
    Internet-style logon
    format (for example:

    &nbsp&nbspUser name: <INPUT NAME="USERNAME" MAXLENGTH=255 TYPE=TEXT
    &nbsp&nbsp&nbspPassword: <INPUT NAME="*PASSWORD" TYPE=PASSWORD
    MAXLENGTH=20 VALUE=*****>

    Press the TAB key to move between the User name, Password, and Domain
    name fields.

    You are connected to %SERVERNAME%
    Copy this code to the \\RISserver\Reminst\OSChooser\Language folder, and
    then save the file as Login.osc. The two values that you must add to the
    Login.osc file instead of ***** are the user name and the password for the
    client. For example, if your user name is "ristest" and your password is
    "deploy," these two lines will appear as follows: &nbsp&nbspUser name:
    &nbsp&nbsp&nbspPassword: <INPUT NAME="*PASSWORD" TYPE=PASSWORD MAXLENGTH=20

    Note If you do not prestage computers in your environment, the user name
    that you create for RIS must have both of the following permissions:
    ? Read
    ? Create Computer Objects

    c. Install.osc <OSCML>
    <TITLE> Client Installation Wizard
    Installation Information</TITLE>
    <FOOTER> [ENTER] continue</FOOTER>
    <BODY left=5 right=75>

    The following settings will be applied to this computer installation.
    Verify these settings before continuing.

    Computer account: %MACHINENAME%

    Global Unique ID: %GUID%

    Server supporting this computer: %SERVERNAME%

    To begin Setup, press ENTER. If you are using the Remote Installation
    Services boot floppy, remove the floppy
    disk from the drive and press ENTER to continue.

    Copy this code to the \\RISserver\Reminst\OSChooser\Language folder, and
    then save the file as Install.osc. When you add "META ACTION=AUTOENTER" to
    this code, the user does not have to press ENTER in the Client Installation
    Wizard because this action is automated.
    d. Warning.osc <OSCML>
    <TITLE> Client Installation Wizard
    <FOOTER> [ENTER] continue [ESC] cancel [F3]
    restart computer</FOOTER>
    <BODY left=5 right=75>

    * * * C A U T I O N * * *

    All data on the hard drive will be deleted!

    Before the new operating system is installed, this computer's hard drive
    must be repartitioned
    and formatted. All existing data on the drive will be deleted during
    this process.

    To continue, press ENTER. To cancel the installation, press ESC.
    Copy this code to the \\RISserver\Reminst\OSChooser\Language folder, and
    then save the file as Warning.osc. When you add "META ACTION=AUTOENTER" to
    this code, the user does not have to press ENTER in the Client Installation
    Wizard because this action is automated.

    4. Set the Group Policy to allow only automatic RIS setup installations.
    To do this, follow these steps:
    a. Click Start, point to All Programs, point to Administrative Tools, and
    then click Active Directory Users and Computers.
    b. Right-click your domain or the organizational unit where the policy
    that you want to edit is applied, and then click Properties.
    c. Click the Group Policy tab.
    d. Click Default Domain Policy, and then click Edit.
    e. In the left pane, expand User Configuration, and then expand Windows
    f. Click Remote Installation Services.
    g. In the right pane, double-click Choice Options.
    h. In the Choice Options Properties dialog box, select the following
    ? Under Automatic Setup, click Disabled .
    ? Under Custom Setup, click Disabled .
    ? Under Restart Setup, click Disabled .
    ? Under Tools, click Enabled .
    Then click OK.
    i. Close the Group Policy Object Editor, and then click OK in the
    Properties box for your domain.

    Creating an ASR backup set
    To create an ASR backup that is set to a tape backup or to create an ASR
    backup that is set to the \\RISserver\Reminst\Setup\English\Images\
    ASRImageName folder as Asr.bkf by using the Backup utility in Windows
    Server 2003, follow these steps:
    1. Create a new Windows Server 2003 CD-based image on the RIS server, and
    name the image folder the same as the corresponding computer name.
    2. On the computer that performs the ASR backup, map network drive Z to
    the folder on the RIS server that contains the image that you created. When
    you restore the image with ASR later, it automatically locates the correct
    files from the Asr.sif file and the Mapdrv.cmd file on network drive Z. For
    example, map the \\RISserver\Reminst\Setup\English\Images\ ASRImageName
    folder to network drive Z on the computer where the ASR backup is
    3. Click Start, point to All Programs, point to Accessories, and then
    click Backup.
    4. To create an ASR backup set in the Backup or Restore Wizard, do one of
    the following

    Note By default, the Backup or Restore Wizard starts, unless it is
    a. To create an ASR backup set in the Backup or Restore Wizard, click to
    select All information on this computer in the What do you want to backup?
    b. If the Backup or Restore Wizard is disabled, create an ASR set in
    Advanced Mode. In the Backup Utility dialog box, click ASR Wizard on the
    Tools menu, and then follow the instructions that appear on your screen.

    Installing the new build image on the RIS server
    Note You must first create a CD-based image of the operating system that
    you want to use for ASR. In all cases with RIS images, you must create a
    CD-based image that provides backup files for subsequent RIPrep, ASR, or
    WinPE images that you might create. Therefore, for every operating system
    that you use for ASR, RIPrep, or WinPE images, you must have a CD-based
    image that corresponds to the binary version of that operating system. For
    example, you might need an image that corresponds to Windows Server 2003,
    Windows Server 2003 Service Pack 1, and so on. To install the new build
    image on the RIS server, follow these steps:
    1. Click Start, and then click Run.
    2. Type risetup.exe , click OK, and then follow the steps to complete the

    Note If this is a clean install of the volume that contains the build
    images, set the Tool.osc file so that the Tools image (Tools.osc) can be
    selected automatically. This can be done in either of the following two
    ways: a. If there is only one Tools image on the RIS server, remove the
    "NOAUTO" text from the default Tools.osc file.
    b. If there is more than one Tools image, leave the "NOAUTO" text
    unchanged . The following OSCML section from the default Tools.osc file
    shows where the "NOAUTO" text is located: <OSCML>
    <TITLE> Client Installation Wizard
    <FOOTER> [ENTER] continue [ESC] go back [F1] help [F3] restart
    <BODY left=5 right=75>
    Use the arrow keys to select one of the following options:
    <P left=8>

    If this is not a clean install of the volume that contains the build images
    or if the Tool.osc file has been modified, you must select the Select old
    menu screens option during RIS setup to make sure that the Tool.osc file is
    not overwritten.
    3. Copy the build image to a new name in the current folder. The name of
    the new image folder is not important, but it will be used to identify
    where bits are copied in the future. For example, the first image is
    located in E:\RemoteInstall\Setup\English\Images\Win.Net¨CADS , and the
    copied image is located in E:\RemoteInstall\Setup\English\Images\
    ASRComputerName BK-ADS.

    Note When you copy the CD-based image, you do not want to modify the image
    that is required for the backup files. Therefore, you must copy the
    CD-based image into a new folder and use the following naming convention to
    rename the image:

    ASR ComputerName operating_system_version

    ASR indicates that this image is used for an ASR. ComputerName identifies
    the exact computer that this ASR backup/disaster recovery image belongs to.
    (Because ASR images are computer-specific, the images can only be used for
    the computer installation that they were originally created from). OSVer
    specifies the operating system version for this image.
    4. Update the Ristndrd.sif file that is located in the
    \\RISserver\Reminst\Setup\English\Images\ASR ComputerName-OSVer
    \i386\Templates folder so that the copied image supports ASR, and then
    rename the file Asr.sif. Do not confuse this Asr.sif file with the actual
    Asr.sif file that the Windows Server 2003 Backup utility generates.

    Note Modify the Ristndrd.sif answer file in the newly created ASR
    ComputerName-OSVer image folder, not in the CD-based image folder that you
    originally created by using the Risetup.exe tool and copied from.

    The following sample Asr.sif file contains the specific changes that you
    must make to the [OSChooser] section to support a Tools (ASR) image: [data]
    floppyless = "1"
    msdosinitiated = "1"
    OriSrc = "\\%SERVERNAME%\RemoteInstall\%INSTALLPATH%\%MACHI NETYPE%"
    OriTyp = "4"
    LocalSourceOnCD = 1

    OsLoadOptions = "/noguiboot /fastdetect"
    SetupSourceDevice =
    "\Device\LanmanRedirector\%SERVERNAME%\RemoteInsta ll\%INSTALLPATH%"

    OemPreinstall = no
    FileSystem = LeaveAlone
    ExtendOEMPartition = 0
    TargetPath = \WINDOWS
    OemSkipEula = yes
    InstallFilesPath =
    LegacyNIC = 1

    FullName = "Microsoft Corporation"
    OrgName = "Microsoft Corporation"
    ComputerName = %MACHINENAME%

    OemSkipWelcome = 1
    OemSkipRegional = 1
    AdminPassword = "Storage12"
    AutoLogon = yes
    AutoLogonCount = 1000
    TimeZone = 4

    AutoMode = PerSeat


    BitsPerPel = 16
    XResolution = 800
    YResolution = 600
    VRefresh = 60


    JoinDomain = %MACHINEDOMAIN%
    DoOldStyleDomainJoin = Yes

    Repartition = yes
    UseWholeDisk = yes

    ASRINFFile=\Device\LanmanRedirector\%SERVERNAME%\R emoteInstall\ASRFiles\%gui
    Description ="ASRMachineName-2003-ADS(Backup-Date)"
    Help ="This image Restores and ASR backup image of Operating System for
    Dated date "
    LaunchFile = "%INSTALLPATH%\%MACHINETYPE%\templates\ m"
    ImageType = "ASR"
    Version="5.1 (0)"

    ;ApplicationServer = OFF
    ;iis_common = ON
    ;iis_inetmgr = ON
    ;iis_pwmgr = ON
    ;iis_www = ON

    5. Create an ASRFiles folder and an ASRPNPFiles folder, and then copy
    Asr.sif and Asrpnp.sif to them. To do this, follow these steps:
    a. Create the ASRFiles folder and the ASRPNPFiles folder in the
    RemoteInstall folder on the RIS server. For example, create the following:
    ? E:\RemoteInstall ? ASRFiles
    ? ASRPNPFiles

    b. Copy the Asr.sif file from the ASR floppy disk to the ASRFiles folder.
    c. Copy the Asrpnp.sif file from the ASR floppy disk to the ASRPNPFiles
    d. Determine the matching GUID by following one of these steps:
    ? Open Active Directory Users and Computers, and then locate the GUID for
    the domain account that was created.
    ? Start a PXE boot of the client computer, and then select a CD-based image
    install. After this install starts, locate the RemoteInstall\Tmp folder and
    notice that the Ristndrd.sif has been copied and renamed to the client
    computer's GUID.sif in the RemoteInstall\Tmp folder.
    ? Use the Microsoft Visual Basic scripting method to locate the GUID. For
    additional information about this method, click the following article
    number to view the article in the Microsoft Knowledge Base:
    302467 How to prestage a RIS client computer using ADSI

    e. Rename the \\RISserver\Reminst\ASRFiles\Asr.sif file and the
    \\RISserver\Reminst\ASRPNPFiles\Asrpnp.sif file to the GUID that is
    assigned to the client computer. For example, if the GUID in the
    RemoteInstall\Tmp folder is 0000000000000000009879o689756, rename the
    Asr.sif file 0000000000000000009879o689756.sif.

    Note The Asr.sif file and the Asrpnp.sif file must match the GUID of the
    client computer that is being restored. If the GUID does not match, you
    receive an error message that states that the setup program cannot find the
    sif files that are located in the ASRFiles folder or in the ASRPNPFiles
    folder. This error message references the GUID.sif file.

    6. Edit the Asr.sif file that you renamed to include the GUID that is
    located in the ASRFiles folder. Add a command line to the Commands section
    to map the \\RISserver\Reminst\Setup\English\Images\ASRWINNET ADSRC1 drive
    after the network is loaded. To do this, follow these steps.

    Note Do not perform this step if you are restoring from a tape backup.
    a. Create a batch file named Mapdrv.cmd that includes the following
    command: net use z:
    \\risnet1\reminstv\setup\english\images\asrwinneta dsrc1 Password1

    b. Create an $oem$\C folder in the ASR ComputerName-OSVer \ folder.
    c. Copy the Mapdrv.cmd file to the ASR ComputerName-OSVer \$oem$\C folder.

    d. Edit your Ristndrd.sif file to set OEMPreinstall=Yes.
    e. Edit your Asr.sif file to call the Mapdrv.cmd as follows: [COMMANDS]
    4=1,3990,0,"%SystemRoot%\system32\cmd /c c:\mapdrv.cmd"
    5=1,4000,1,"ntbackup","recover /1"

    Hope this helps.

    Mike Luo

    Microsoft Online Partner Support

    Author Comment

    I'm sorry, but i'm only looking to automating the backup of a server using the ASR process. Instead of using the ntbackup wizard to make an ASR, i would like to script it and run it as a scheduled job. I'm referring to the backup process, not restore

    Please help

    Author Comment

    Also one more question regarding the ASR, the exclude files option in the ntbackup utility, does that apply to ASR? Will that exclude the files/directories while making an ASR as well?

    Always Alert
    LVL 8

    Accepted Solution

    Here is a link to a tool that may assist you:

    Featured Post

    IT, Stop Being Called Into Every Meeting

    Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

    Join & Write a Comment

    It is a known fact that servers reach the end of their lives. Some get there quicker than others, based on age, manufacturer, usage and several other factors. However, if your organization has spent time deploying Microsoft's Active Directory server…
    Setting up a Microsoft WSUS update system is free relatively speaking if you have hard disk space and processor capacity.   However, WSUS can be a blessing and a curse. For example, there is nothing worse than approving updates and they just have…
    Hi everyone! This is Experts Exchange customer support.  This quick video will show you how to change your primary email address.  If you have any questions, then please Write a Comment below!
    Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…

    746 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    19 Experts available now in Live!

    Get 1:1 Help Now