Reinstalling Windows for many people is the same as usual and everyday operation, as well as antivirus database updates. So why not automate this routine?

Somewhere far away, in a distant country America there are huge corporations that live in huge sotnietazhnyh buildings where stretched kilometers of shielded wires and large air-conditioned rooms of thousands of Americans working for the thousands of personal computers. Somewhere in the depths of these buildings, in small rooms, sitting smart sysadmin, who left for permanent residence, click on the buttons and administer tens and hundreds of high-end servers that are in the real server - a centralized cooling, electronic locks and test the retina ...

Such visions probably ever visited so every Ukrainian sysadmin. And each of them in their dreams must have seen himself in a suit and tie included in one of these high-rise buildings.

In Microsoft about these buildings not only know - they have the building. And thousands of desktops as well. Therefore, the question of convenient installation in the tens or hundreds of PC operating system has to stand in front of Microsoft admins as sharply as before everyone else.

Whatever it may be, but Microsoft has developed several ways to make life easier sysadmin large enterprises. You do not have to sit for an hour prior to each PC to him then it was possible to put the user. There are several options for accelerated Installing Windows: frequently

  • Unattended Installation - Installation unaccompanied;
  • Sysprep Installation - method of disk duplication;
  • Remote Installation - Remote installation.

Unattended Installation

Windows can be installed by using the responses of special files automatically to computers with different configurations. These files are described all the parameters that are required to install Windows on a new PC and that a typical installation, it finds directly from the user. Thus, ahead of time with the answers to all your questions, Windows makes the installation itself is entirely without user intervention.

Although there is one in this case, "but." Firstly, the response file needs to be properly formed and must contain adequate responses. If this file will be error, the automatic installation process, at best, stop until the correct answer. In the worst case - it is simply interrupted and have to start all over again.

The answer file can be prepared manually - in any text editor, based on a template that is located on the Windows 2000 distribution CD-ROM in the directory \ I386 \ unattend.txt.

Setup Manager to unpack the file from deploy.cab

But the need to deal with the file structure is not present, as in Windows 2000, there is a supply of special utility to edit and create answer files (or, in other words, the installation script). This program is called Setup Manager. It is not installed with Windows, and is waiting in the wings on the installation CD.

To use Setup Manager, you need to unzip the program file from the \ support \ tools \ deploy.cab from the installation CD. Windows 2000 cab'ami turns freely, so you just need to go guide to deploy.cab and copy the files to copy ... But all - sysprep.exe and setupcl.exe too someday be useful.

Take in the hands of "automatic"

Now, do not delay it in the long sisadminsky box, immediately set about creating a script install Windows 2000. After you run Setup Manager (setupmgr.exe) you can create a new answer file (Create a new answer file), create an answer file to the current computer ( Create an answer file that duplicates this computer's configuration), to modify the existing response file (modify an existing answer file).

If the task is to create an answer file to install or reinstall Windows 2000 Professional test in the workplace of employees, it is reasonable to assume that creating an answer file is convenient to perform on the basis of the current computer. If this is a typical computer workstation.

Creating a new response file will be useful in the case of, for example, motley equipment when each computer itself is a relic of a long-gone time and a full set of antique computer components. Or, for example, in a situation where all the computers in the company of just going to the extent necessary, and therefore the same parts in them are not so much. (Sounds familiar, does not it?)

So, in any case much more effective once before installation to create an answer file, and then use it to trivial reinstall the Windows, which, when the user makes another "achtoneznayu" easier to reset than to look for what's wrong.

But perhaps it is worth to make a reservation - Microsoft has created the Windows Installer automatic mode for updates and to reinstall Windows. To install the system from scratch on bare metal provided the other modes - remote installation over the network and the method of disk mirroring. But she and Microsoft, to assume. But our hands are there in order to then "placed" software from Microsoft as it is more convenient, and not "as it should be." Tea is not the first time.

So, to install Windows 2000 on a computer can be naked. However, there is one point - to bypass entering the serial number does not succeed. This, of course, lubricates the effect of the fully automatic installation of Windows, but, you see, putting some figures - it is still much less than the multiple input the requested data during normal interactive install Windows.

In any case, whether the system upgrade, reinstall it, or clean installation, the structure of the response file that does not depend. So that a ready answer file can be used for all occasions.

cock

So is determined - for example, that it is believed to create a response file based on a standard computer. After running the Setup Manager specify the type of installation - Windows 2000 unattended installation. This is the automatic installation. As mentioned above, provided two Windows deployment type (disk duplication method and remote installation over the network).

Further indicates that plan to install Windows 2000 Professional (if you want you can and Windows 2000 Server installed).

The next screen is very interesting. For the fully automatic installation, you must select Fully automated mode (fully automatic) - user can not view or change the answers given scenario.

In Provide defaults mode (providing the default values ​​of the parameters) the answers given in the answer file will be the default values ​​that the user sees. At the same time he will be able to change them during the installation process.

The Hide Pages mode (do not display dialog boxes) are used during installation scenario answers. All windows, which are used for answers script, hidden from the user, which is thus deprived of the opportunity to view or change the answers.

The mode Read Only (read only) the user can view the answers to all pages visible without the possibility to change them.

The GUI Attended mode (full interaction with the user) textual part of the installation is carried out automatically, the installation of the graphic user performs manually.

Each mode can be useful in working. GUI Attended is fine, if a computer is transferred to the branch office. Then, having set the basic parameters (installation directory, computer name, etc.) in accordance with the corporate standard, a user on the site will be able to install the necessary equipment and, to configure the system as needed. Of course, if he has to do to be the appropriate authority. Administrator password, for example.

Further parameters specifying the process is quite simple - the acceptance of the license agreement, the user name, organization name, computer name ... Stop. computer name, you can specify a few. In this case, the file differences (with rasshireniem.udf), which can be used for installation on multiple computers with a single response file is created. By the way, a list of computer names can be created in a simple text file. Every new computer name on a new line. For example:

  comp1
 comp2
 comp3 

hold your breath

Then a text file with a list can be imported in the Setup Manager.

The list of computers can be imported from a text file

Go ahead - the local system administrator password, the number of times the automatic logon (you can specify 0), screen settings, network settings. We stop on the computer joining the domain or workgroup. There is a nuance. Since the response file is a simple text file, all the data stored in it in the form of ordinary letters from the standard set of Windows. Accordingly, all passwords are stored in the form in which they are "buff". Therefore, if you connect the computer to the domain at the same time creating a dedicated account computer in the domain, you will need to specify a domain administrator username and password. Clear pepper, that for security reasons it should not do. You can simply specify the domain, which will have to enter the computer and on the domain ahead of time to create a dedicated account for him. It's easier and safer.

All passwords in the response file is stored in the clear

Then again, "nonsense" - region, the area code (for modem), a type of telephone lines, Internet Explorer settings, directory name, which will are running Windows, the printer name.

What follows is a very interesting field. Here you can specify commands that are executed when the user first Logone. It can be run or patches to patch the system, or start installing the necessary software. In general, a very useful thing.

Further, in the Distribution Folder window, you can create a distribution folder on the local computer or network. In this folder you can add any additional files that are needed for a complete installation of the system, and run them on the performance of the teams that will be executed at the end of the installation. To do this, select Yes, create or modify distribution folder. A useful feature for installing workstation on the LAN.

If the system is installed on a single computer, it can be installed from the distribution CD. Then you can click No, this answer file will be used to install from a CD. If this option is selected, the creation of a response file ends with the next step. If you choose to create the distribution folder, then the process of creating an installation script continues - need to train all the same to determine the distribution folder. You can specify an existing directory (Modify an existing distribution folder) placed with your Windows 2000 or create a new one.

It should be noted that the directory can be located either locally or on any of the available computers on your network. When creating a new distribution folder (Create a new distribution folder) need to specify the name of the local folder. You can then specify drivers for other mass storage devices. And add another HAL (hardware Abstraction Layer) - instead of the default.

This is followed by another opportunity to run the necessary commands in the installation process. Team is also possible to add a lot.

In the next window - OEM Branding - You can set the logo (Logo), which will be displayed during the installation, as well as drawing for your desktop, which is established after installation (Background). Here ottyag each entirely independent of his personal imagination and fantasy. You can easily insert a logo SamSobral, Inc. and a picture of the DOOM III cheerful (if there is any such exist). Let users appreciate new life, peace and beauty of the pristine Windows desktop.

But that's not all. The process of creating a script install Windows 2000 does not end on such a positive note. Why? Question about Microsoft.

The next step is to specify which additional files and folders to be included in the installation. This is, again, the opportunity to add the necessary drivers, patches, etc., required for a complete automation of the installation (by the way, you can not add anything).

And finally the end, sorry for the tautology. Defining the response file name and click Next. As the "not all" ?! It is also necessary to copy the files from CD? Well, yes, because we are going to install Windows using a distribution folder. And there must be self distribution. So this procedure is necessary to perform mandatory.

Now really all - the answer file and distribution folder ready. You are ready to install.

Fire!

Well, apart from the distribution folder (in addition, shared with the specified name win2000dist), we are such that we should be sure to check out? Setup Manager has formed two files - unattend.txt and unattend.bat. The text file contains all the settings, and bat-file is designed to run the installation program. That's his job content:

  set AnswerFile =. \ unattend.txt
 set SetupFiles = \\ HOME \ win2000dist
 \\ HOME \ win2000dist \ winnt32 / s:% SetupFiles%
 / Unattend:% AnswerFile% 

Here HOME - name of the computer on which the creation of a response file produced. But nothing prevents to create a distribution folder manually on any of the computers on the network, share the it and to indicate to the batch file instead of HOME. Bindings in unattend.txt to a computer with no distribution folder. This information is taken as the time from the bat-file. There is only a reference to the name of Balls (Win2000dist). Therefore it is better rassharivat distribution folder with the same name. Although if you make changes in the txt-file and a batch file, the installation will run on any computer.

If the installation script to create a folder without a distribution, provided that the installation will be carried out from the CD, the content of bat-file will be approximately as follows:

  set AnswerFile =. \ unattend.txt
 set SetupFiles = H: \ i386
 H: \ i386 \ winnt32 / s:% SetupFiles% / unattend:% AnswerFile% 

That is, instead of the UNC-name to use a direct path to the file winnt32 on the installation CD. Here "H" - the letter of your CD-ROM'u.

If you specify multiple computer names to use a response file to many computers, Setup Manager creates an additional file with an extension udf. bat-file will also be changed - roughly as follows:

  set AnswerFile =. \ unattend.txt
 set UdfFile =. \ unattend.udf
 set ComputerName =% 1
 set SetupFiles = H: \ i386
 if "% ComputerName%" == "" goto USAGE
 H: \ i386 \ winnt32 / s:% SetupFiles% / unattend:% AnswerFile%
 / Udf:% ComputerName%,% UdfFile% / makelocalsource
 goto DONE
 : USAGE
 echo.
 echo Usage: unattend ^ <computername ^>
 echo.
 : DONE 

As you can see, now the name of the computer that you want to install, used as a parameter when you run the bat-file. If the name is omitted, the unit issued a string USAGE prompted to supply a parameter. Command line refers directly to CD, because the installation from the CD was chosen. Accordingly, in the case of the distribution list instead of the H: \ i386 would be the computer UNC-name, a distribution folder. Also new to specify an additional parameter - use file differences unattend.udf.

To start the automatic installation is run on a running Windows bat-file and leave the setup program to deal with the installation. In the meantime, you can actually "sit back". Administrators with experience know what that means.

"Russian roulette"

Well, of course, we would not be Russian people, if not try to spoil everything. The question is, why mess with Sysprep and Ghost'om, if you already have finished the installation script. Here it is: stretch out your hand, press the button - and Windows 2000 Professional, after 50 minutes there will be on the new computer. But no. It will not work. In the batch file specified executable Windows winnt32.exe installation file is designed to work on a running Windows.

To install Windows on a bare system will need to run the installation from the DOS-mode, using winnt.exe file. Not only that, we will need a boot diskette, you must also change the bat-file itself - as winnt.exe parameters differ from the parameters winnt32.exe. Another problem - with the letters assigned to CD-ROM'u.

Among other things, it needs to be fully prepare the hard drive to install the Windows, because the automatic installation wizard assumes that the disk partition and format - and therefore to do this during the installation process does not intend to.

Let's start with a boot floppy. Bootable Windows 95/98 / ME will not work, because at a certain stage of the installation wizard is aware that it is installed on top of an older version of Windows, and absolutely require a graphical interface to continue. This automatic installation and finish. Therefore, you must use only genuine MS-DOS. In order to be able to accurately recall of bat-file on CD-ROM, you need to run the driver parameters CD-ROM directly specify the letter, which will be denoted by CD-ROM. If you use the standard drivers and mtmcdai.sys mscdex.exe, in line start mscdex.exe need to specify the parameter / L: X (where X - the letter of your CD-ROM'u).

The next step - change of bat-file. two lines to change.

In this case, replace:

  set SetupFiles = H: \ i386 

on

  set SetupFiles = Õ: \ i386 

and the command line:

  H: \ i386 \ winnt32 / s:% SetupFiles% / unattend:% AnswerFile%
 / Udf:% ComputerName%,% UdfFile% / makelocalsource 

on

  Õ: \ i386 \ winnt / s:% SetupFiles% / u:% AnswerFile%
 / Udf:% ComputerName%,% UdfFile% 

We consider this change carefully. Winnt32 replaced by winnt. Key / unattend replaced by / u. Parameter / makelocalsource removed because it is not supported winnt.exe.

Bat-file is ready for launch. Now all unattend-file needs to be copied to the boot disk to start the installation immediately after booting the computer.

Should I remind you that you need to install the BIOS to boot from the flop. Next best to set boot from the HDD, and only then from a CD. This is to ensure that reboots the computer has started from the hard disk.

Now you need to partition and format the HDD to the target computer. This can be done or extraneous PC or immediately - with a bootable floppy disk. break the entire drive is not necessary, as the DOS-mode does not allow to create partitions larger than 2 GB, and beat the 80-gigabyte disk partition 40 is not effective. One partition for the Windows 2000 installation is sufficient. Minimum system requirements include the allocation of 650 MB for installation of Windows 2000 Professional. Recommended system requirements insist on 2GB. The rest of the disk space, and file system conversion as NTFS can be left for later.

After partitioning and formatting the disk can be transferred to the system on HDD - and unattend-file to the same floppy disk that is no longer needed. Now you can change the order of the boot in the BIOS - the first to put the HDD and boot from it. Once downloaded, you can run unattend.bat (without parameters - if the answer file created based on the same computer, with the option - if the response file created for multiple computers).

Kreks! PAX! Fax's!

No. Bury near a computer five gold and do not need to cast over them. Just keep in mind that in the process of Windows 2000, an unattended installation on the bare computer is one question remains - is the product license key. As already mentioned, it is understood that Windows is installed on the licensing system that already has the license key, so Setup Manager, this information is not requested. So during installation it must be entered manually. And therefore the availability of the required number of compulsory licenses.

And the effectiveness of the automatic setup. Most of it will return when all components of the computer are officially supported by Microsoft and are included in the Hardware Compatibility List - Hcl.txt (this file comes with each distribution in the directory \ Support the distribution CD). For all the components present in the list of drivers to be installed without a hitch. Of course, if any of the components are not supported by Microsoft officially, then it will have to additionally install the drivers by downloading them from the website zhelezyaki producer.

Part of the problem is solved by full operation Plug-and-Play during an unattended installation, as well as the possibility of the introduction of the necessary files in the installation process and launch their separate commands after the end of the main setup process. But with a certified fuss equipment still less.