WinXP Unattend Install

Embed Size (px)

Citation preview

  • 8/6/2019 WinXP Unattend Install

    1/22

    Windows XP Unattended Installation

    Written: August 26, 2002Written by: Jeramie Lorson (1gigkid)

    In this article I am going to provide you with a basic example of how to perform an unattendedinstallation of Windows XP. This will get you started in customizing the way Windows XP is setup. If yochoose to further customize the way Windows XP is setup, there is plenty of documentation on theinternet to help you with some of the more advanced tools available. I will provide you with someinformational links throughout this article to possibly answer any other questions you might have.

    An Unattended Installation is a hands-free method of installing Windows XP. This is convenient forsystem administrators, original equipment manufacturers (OEMs), value-added resellers (VARs), userswho install Windows XP on many computers or who frequently install Windows XP on the samecomputer.

    I will show you step by step how to supply Windows XP Setup with all of the information that you theEnd User is prompted to provide during a typical Windows setup in a scripted file called the answerfile. The answer file basically fills in the text portion of the setup and can even setup options that youwould normally spend most of your day doing after a typical or normal Windows install. Even if you dnot know the first thing about scripting, Microsoft has generously included the tools you need on yourWindows XP CD. If youre using Windows 2000, you can follow this guide also. The tools are prettymuch the same.First of all we need to make sure you are able to perform an unattended installation from a BootableCD. To perform an unattended installation from a bootable CD, your Systems BIOS must adhere to theEl-Torito non-emulation specification. If your systems BIOS is less than a few years old, it more than

    likely supports this specification.For information about this specification, go to Microsofts Knowledge Base Article - Q167685

    Here is what you are going to need:

    1. At least one computer - One that has a Windows XP Operating System already in place.

    2. Youre Windows XP CD - To retrieve the tools you are going to need.

    3. One formatted floppy disk - This is where we will put the finished answer file.

  • 8/6/2019 WinXP Unattend Install

    2/22

    *Note - If you do not have a floppy drive, I will provide you with an alternative method later in thearticle.

    Lets get started

    Put in your Windows XP CD. If you have autorun enabled it should pop up the Welcome to MicrosoftWindows XP. In this window you should see a set of options. Here you want to select Performadditional tasks.

    If you have autorun disabled, you can simply open My Computer. Then you will need to right click onthe drive you have your Windows XP CD in and in the drop down menu click on Explore. This willallow you to view the contents of the CD.

    In the next set of options you want select Browse this CD.

  • 8/6/2019 WinXP Unattend Install

    3/22

    You should now see the contents of the CD. Now open the Support folder and then the Tools folder.The file we are looking for is a compressed file called DEPLOY.CAB. Before you go any further make anew folder on your desktop and extract the contents of this CAB file to that folder. You can name thisfolder whatever you like. Now open the folder that you just created. You should see a few different fileshere. The one we want is setupmgr.exe. For now just disregard all the other files except for theWindows XP Preinstallation Reference.(ref.chm) This is a help file that goes more into creating ananswer file and explains more about the other files that are included in the folder that we just made. Ifyou run into problems it might come in handy.

    Welcome to the Windows Setup Manager - This Wizard is going to take us through the options ofcreating the answer file. Just click next here.

  • 8/6/2019 WinXP Unattend Install

    4/22

    Create or Modify the Answer File - Since this is going to be your first answer file, select Create anew answer file and click next. Once you have created an answer file successfully, you can edit it withthe Setup Manager by selecting Modify an existing answer file and providing a path to it.

    Type of answer file to be used:

  • 8/6/2019 WinXP Unattend Install

    5/22

    Windows Unattended Installation - Unattended installations use setup scripts to answer installationquestions and to automate the Setup process. This simplifies the installation of the operating system.

    Sysprep Install (System Preparation Tool) - Disk imaging, which is also known as cloning. This is atimesaving way to install Windows XP on multiple computers that use identical or similar hardwareconfigurations.

    Remote Installation Services (RIS) - Enables you to perform a clean installation of Windows XPProfessional on multiple computers throughout a network. You can simultaneously deploy the operatinsystem on multiple clients from one or more remote locations.

    For now, we are going to choose the Windows Unattended Installation option.

    Windows Platform - Which Version of Windows XP are you going to install? For me that would beWindows XP Professional.

  • 8/6/2019 WinXP Unattend Install

    6/22

    User Interaction during Windows Setup:

    Fully automated - This option will not prompt you for any information.

    Provide defaults - This option will fill in the info you supply but you will be able to change it if you chooto.

    Hide pages - This option does pretty much the same thing as the fully automated with the exception ofletting you see the Setup Wizard.

    Read only - This option does pretty much the same thing as the Provide defaults option with theexception that you would not be able to change any of the settings.

    GUI attended - This option only allows the text portion of the Setup to be automated.

    For this article, lets stick with the Fully automated option.

  • 8/6/2019 WinXP Unattend Install

    7/22

    Distribution Folder - Select No because we will be installing from a CD. Once again, after you havegot this down you can play with the other options. If you wanted to install from a network share, youwould choose to create a distribution folder. The distribution folder option gives you the flexibility to adother files as well, such as drivers not found on the Windows XP CD.

  • 8/6/2019 WinXP Unattend Install

    8/22

    License Agreement - We obviously can not forget about the License Agreement. We have to check thnow because we will not be seeing it during the install.

    Customize Software - Now its time to input your personal information. Im sure most of yourecognize this from all the previous Windows installs that you have done before.

  • 8/6/2019 WinXP Unattend Install

    9/22

    Display Settings - Everyone is different when choosing display settings. Put in what you mostcommonly use here. If youre not sure what your video card and monitor supports, just choose Windowdefault. If you try to over do it you may run into problems later. Remember that running a monitor at arefresh frequency that it does not support can damage the monitor. Once again, if youre not sure just sit to Default.

    Time Zone - This one is simple enough. What time zone do you live in?

  • 8/6/2019 WinXP Unattend Install

    10/22

    Product Key- This is a handy one. Put your Product Key here. Have you ever lost your Product Key?You can't install without one. Saving it to the answer file will automatically put it in for you. Just dontlose the floppy that you are putting it on. Im not showing mine here for obvious reasons.

    Computer Names - If you plan to use your name as a user on this computer it cant be the same as thname here. You can also have the setup automatically generate the name by ticking the box at thebottom. If you plan to use the exact same setup on multiple computers then you would add their nameshere as well.If youre willing to accept computer names that follow no pattern, you can allow Setup to create eachcomputers name on the fly by appending seemingly random letters and numbers to the first few lettersof your organizations name.

    When you enter multiple names during the setup process, Setup Manager automatically generates theUniqueness Database File (UDF) that is required to add those unique names to each computer duringsetup. If the administrator imports names from a text file, Setup Manager converts each name to aUniqueness Database File. The administrator can also set an option to generate unique computer name

    You can find more information on Using Uniqueness Database Files at Microsoft TechNet.

  • 8/6/2019 WinXP Unattend Install

    11/22

    Administrator Password - If you dont want someone to look at your answer file to figure out what is tic the Encrypt password box. You can also specify the number of times it allows the computer to autologon as the Administrator. I choose 1 because there are certain settings I change that can only be donby being logged on as Administrator. Let me stress that a user with administrative rights is not thesame.

    *Note - Automatic Logon does not work if the local administrator password is encrypted in the answerfile.

    More information on this can be found at Microsofts Knowledge Base Article - Q312394

  • 8/6/2019 WinXP Unattend Install

    12/22

    Networking Components - By default the Setup Manager includes the Microsoft Networks Client,File and Printer Sharing, and TCP/IP. If you rather set this up later, leave it at the typical settings.I like to have my network up and going when it boots the first time, so I made some changes here. Forone, I added the QoS Packet Scheduler. This way I can control the Bandwidth that the other computerson my network tie up.Also notice that I have TCP/IP highlighted. Now click on the Properties button.

    TCP/IP Settings - This is not necessary but like I said before, I like my network to be ready to go whethe computer boots for the first time. Since I am on Dial-up and have to use ICS (Internet ConnectionSharing), this is an example of the TCP/IP settings I could use on a computer that has to connect to the

    internet through another computer.

    *Note - If you choose to configure TCP/IP properties in your answer file, you must create a uniqueanswer file for each computer you are setting up on your network.

  • 8/6/2019 WinXP Unattend Install

    13/22

    Workgroups and Domains - Here you just need to add the name of the workgroup or server domainyour computer is going to be on if any.

  • 8/6/2019 WinXP Unattend Install

    14/22

    Dial-Up Settings - I dont feel I need to explain this to much. If you need to set up dialing options, doso here. Since I am going to be connecting over a LAN, I will not need to set this option up.

    Regional Settings - By default this is set to English (United States). Well at least my version of XP isthis way. Again, I dont think this is too painful of a decision. So make a choice and lets move on.

    Language Support - If you need Language support, do so here and click next.

  • 8/6/2019 WinXP Unattend Install

    15/22

    Browser and Shell Settings - Here we have three choices. For the method we are using now, wereally only have one choice. Default Internet Explorer settings is the only one we can use because theother two require a distribution folder to be made. We chose to install from the CD instead. Even thougyou can set the others up here, it will not work without creating a distribution folder.

    Installation Folder - I usually like to stick with the Windows folder but you can do what ever you like

  • 8/6/2019 WinXP Unattend Install

    16/22

    Install Printers - Heres an example of how you would install a network printer if it was not hookeddirectly to the machine you are going to install the OS on. If the computer that my printer was on wasnamed Jeramie, I would use \\Jeramie\Printer as my Network printer name. In order for it work yowould have to make sure that Printer sharing is enabled on that computer. To do this, go to thatcomputer and go to Start/Control Panel. Then open Printers and Faxes. Right Click on Printer and selecsharing from the menu. In the Sharing Tab make sure you have Share this Printer ticked and make surethe Share Name is the same as in the answer file. For example I used Printer which is what Windowsuses by default. Name it what ever you want but make sure the names match. You could do the same foa fax machine. In the answer file it would look like this \\Jeramie\Fax.

  • 8/6/2019 WinXP Unattend Install

    17/22

    Run Once - As you can see in the Run Once section it has all ready set up the command to add theprinter. There are other commands you could use here also. In the answer file I am creating here I woulbe setting up the disk partitions manually. If you wanted to have the answer file do it for you, you wouldadd the command for it here also. This would require you to create a new batch file. Once again, you canmake this as simple or advanced as you like.

    More information can be found at Microsoft TechNet on how to have your answer file format yourpartitions for you.

    Additional Commands - This is somewhat more of an advanced feature. It allows you to have setupinstall things that you would normally want to install right after Windows XP. If you desire to ventureinto it and what it can do for you, Creating a Combination Installation is an example of one way to usethis. This would require you to choose different options in the setup manager than we did here. For thisarticle we are going to leave it blank. Now click Finish.

  • 8/6/2019 WinXP Unattend Install

    18/22

    Save the Answer File - Now put in your formatted floppy disk into your A drive. Where it saysLocation and file name, type inA:\winnt.sif. It should look just like the image below. Since we areusing the CD Boot method, we must name the answer file winnt.sif. Click OK.

    If you do not have a Floppy driveor just want to put it on your Windows XP CD - You willneed to save the answer file to your hard drive aswinnt.sif. You will be required to make a backup ofyour Windows XP CD. First of all, you will need to extract the contents of your Windows XP CD to yourhard drive. Then you must add winnt.sif to the I386 folder. You will not need to use the batch file(winnt.bat). Dont forget to add winnt.sif first. After extracting Windows XP from the hard drive you canot just burn it to a CD (it won't be bootable). Follow the instructions at Binks site onHow to make you

    XP bootable.I would also recommend using a CD-RW the first time you try doing this. If you messsomething up you will not be wasting your CD-Rs.

  • 8/6/2019 WinXP Unattend Install

    19/22

    Setup Manager Complete - Congratulations! You have now created your first answer file. Here it istelling you that it has created two files for you.

    winnt.sif- This is the answer file

    winnt.bat - You will also need this batch file on the floppy. It tells the answer file where to find the fileneeded for Windows Setup.

    Now go to where you saved your answer file. Right click onwinnt.sifand open with Notepad. Youshould see something similar to what you see below except that it should your answers instead of mine.If you want to make some last minute changes do so now.

    If you like to make multiple partitions on your hard drive you will need to make a minor change to theanswer file. In the [Data] section have a look atAutoPartition. With the current setting at one it willautomatically choose a partition to install to. This will take away your option to make partitions. If youwould rather create your own partitions set the 1 to 0. I recommend you do this if you already have anoperating system installed on your computer that you would like to start fresh with or if you want XP tocreate a dual boot for you. You should have a second partition to do a dual boot.

    Moving Documents and Settings folder to another drive Windows, by default, installs theDocuments and Settings folderin the same partition of operational system. Otherwise, it is possible tomove this folder to another partition and keep the security file system. Right click on yourwinnt.siffil

    and open with Notepad. In the [GuiUnattended] section, include a new instruction at the end ProfilesDir = "D:ProfilesDir = "D:ProfilesDir = "D:ProfilesDir = "D:\\\\Documents and Settings".Documents and Settings".Documents and Settings".Documents and Settings". Do not forget the . You can use the folder name you wish

    UserProf , Profiles or Users are good choices. In this example, my second partition is D:\. Use thecorrect letter to your case. Save the file.

    ;SetupMgrTag[Data]

    AutoPartition=1MsDosInitiated="0"

  • 8/6/2019 WinXP Unattend Install

    20/22

    2

    UnattendedInstall="Yes"

    [Unattended]UnattendMode=FullUnattendedOemSkipEula=YesOemPreinstall=NoTargetPath=\WINDOWS

    [GuiUnattended]AdminPassword="password"EncryptedAdminPassword=NOAutoLogon=YesAutoLogonCount=1OEMSkipRegional=1TimeZone=20OemSkipWelcome=1ProfilesDir = D:\Documents and Settings

    [UserData]ProductID=ABC12-3ABC1-23ABC-123AB-C123AFullName="Jeramie Lorson"OrgName="Hytek Computer"ComputerName=JL1

    [Display]BitsPerPel=32Xresolution=1280YResolution=1024Vrefresh=85

    [GuiRunOnce]Command0="rundll32 printui.dll,PrintUIEntry /in /n \\Jeramie\Printer"

    [Identification]JoinWorkgroup=WORKGROUP

    [Networking]InstallDefaultComponents=No

    [NetAdapters]Adapter1=params.Adapter1

    [params.Adapter1]INFID=*

    [NetClients]MS_MSClient=params.MS_MSClient

    [NetServices]MS_SERVER=params.MS_SERVERMS_PSched=params.MS_PSched

    [NetProtocols]MS_TCPIP=params.MS_TCPIP

    [params.MS_TCPIP]DNS=NoUseDomainNameDevolution=NoEnableLMHosts=YesAdapterSections=params.MS_TCPIP.Adapter1

    [params.MS_TCPIP.Adapter1]SpecificTo=Adapter1DHCP=NoIPAddress=192.168.0.2SubnetMask=255.255.255.0DefaultGateway=192.168.0.1DNSServerSearchOrder=192.168.0.1WINS=No

  • 8/6/2019 WinXP Unattend Install

    21/22

    2

    NetBIOSOptions=0

    Now Right click on yourwinnt.bat file and in the menu clickEdit. This is a batch file. A batch file is afile containing instructions that are executed one after the other. Notice that in the batch file it tells youthat it may need to be modified. You may need to edit the path for setup to find the files it needs. Thebatch file here says:

    1. The answer file is winnt.sif

    2. Setup files are located on E:\ (My CD-ROM Drive) in the I386 folder.3. Tells Setup to begin using winnt32 with a script to tell it to use the unattended method.

    If youre going to be using this on another computer you may have to change the drive letter to whatevethe CD-ROM is set at.

    @rem SetupMgrTag@echo off

    remrem This is a SAMPLE batch script generated by the Setup Manager Wizard.rem If this script is moved from the location where it was generated, it may have to be modified.rem

    set AnswerFile=.\winnt.sifset SetupFiles=E:\i386

    E:\i386\winnt32 /s:%SetupFiles% /unattend:%AnswerFile%

    Now its time to start the installation.

    First, you're going to need to change your boot order in the BIOS to boot from CD-ROM. Once you dothis you'll then be able to boot your computer from the Installation CD and perform the installation ofWindows XP.

    After changing the boot order in BIOS, save your changes and reboot the computer. Make sure yourInstallation CD is in your CD-ROM. If it is you'll be prompted to press any key to boot from CD-ROM.Press any key on your keyboard as soon as you see this message. Wait a few minutes while theinstallation begins to copy the preliminary setup files to your computer.

    If you decided to make create your own partitions, you need to decide which partition of your hard drivyou will install Windows XP on. Once you have figured out which partition XP will be installed on it'stime to format it.

    Choose to format the partition to either FAT32 or NTFS. After you have select one of the options hitenter and Setup will begin to format the partition. You will have to format the other partitions after youare finished with your installation of XP. You can do this with Administrative Tools in the Control Pane

    Now just sit back and wait or go do something else. The next things you will be asked to do are register activate Windows XP and setup user accounts. Everything else is done for you.

    Conclusion

    Using this method of installing windows XP may take a little of your time at first but can be handy infuture installations of Windows XP. I personally like the fact that this allows me to not worry aboutsetting up certain things like networking. I also prefer just adding my answer file to my Windows CD ju

  • 8/6/2019 WinXP Unattend Install

    22/22

    because I dont have to find the floppy later or worry about it corrupting. I would recommend you try thfloppy method first so you can play with all the different ways of automating Windows XP setup.

    Informational Links:

    Deploying Windows XP Part I: Planning

    Deploying Windows XP Part II: Implementing

    Deploying Windows XP Using Windows Product Activation

    Microsoft TechNet

    Binks Site