From Diegostart

Jump to: navigation, search


What is it?

DiegoStart is a methodology that uses unattended software installation techniques to install Microsoft Operating systems including all desired applications with minimum user interaction. It also allows you to customize and secure your computers through the use of scripts and registry keys. DiegoStart can be used for all Windows operating systems starting with Windows 2000 and including the server class OS.

Why the name? Since Linux and Solaris have unattended installation techniques known as Kickstart and Jumpstart respectively, it was only natural to find a simliar naming convention. DiegoStart takes after the name of its creator and resembles its Linux and Solaris counterparts.

How long has DiegoStart been out there? Diegostart was first developed after the release of Windows 2000. It has matured a lot since then. It originally worked by copying the answer file in the Windows installation cd and you had to burn a new cd to make any change to the answer file. Today, DiegoStart is highly configurable to allow the installation of different Windows OS's (Win2k, WinXP pro, WinXP home) and different types of systems.

What is required?

Diegostart has hardware and software requirements as well as a basic knowledge of batch scripting in DOS:


  • File server: A computer capable of offering Windows (smb) shares with at least 2GB of available hard drive space for DiegoStart. The more software and OSs that you add will require more space.
  • Client computer: An x86 machine with a network card. Since DiegoStart installations are performed from a network share, the client computer needs to have a network card to be able to mount the setup files from the server.
  • DHCP server: if you do not have a dhcp server, simply get a DSL/Cable router which offers the dhcp capabilities. It is also recommended to do installations this way so that you are on an isolated network until the installation is finished. Remember that you are installing an operating system which is regularly patched. So doing it behind a "firewall" makes sense. I personally prefer the Linksys hardware such as the WRT54G (It does not need to be wireless, a BEFSR41 will do).
  • Switch: If you are using a device like a Linksys router, then you can only do 3 clients at a time (the 4th network jack is used for the server), so if you intend to do more than 3 clients at a time, you will need a switch.


  • BartPE: You can think of BartPE as a Windows Live CD, that means that you boot your computer from the CD and you have the operating system running from the CD itself. BartPE CDs are fairly easy to make, the pebuilder software is developed by Bart Lagerweij and his web site is More detail on obtaining pebuilder and creating the BartPE cd can be found in the How To section.
  • Windows Installation CDs.
  • Windows updates for each OS that you will include in DiegoStart.
  • Installation files or CDs for all the software that you want on your client machines.
  • Ghost AI Builder (Not Required - Deprecated): If you have a license for Ghost, you already have the AI Builder application. This can be useful if you want to install a software package for which the developer did not include unattended installation switches and the only way to install the software requires interaction. There are some other alternatives to this, but they will not be discussed.
  • VMware Workstation (Not Required) It can turn useful for testing

How does it work

Boot client computer

The BartPE CD is used to boot the computer so that we can map a network drive that contains all the files required to install OS, software, updates, etc.

Client computer Booted up
Client computer Booted up

Map Network drive

The BartPE CD has a DiegoStart menu from which the user can map the network drive Z: to the setup files stored in the server.

Mapping network drive
Mapping network drive

Note: After the drive is mounted, the user will be asked to reload the Nu2menu to enable all other menus by clicking on: Go-->System-->Nu2menu-->Reload Menu.

Partition hard drive

The DiegoStart menu contains a section to allow the user to partition the hard drive as needed. Usually only one partition is created and assigned the drive letter C: and the remainng partitions can be created manually after DiegoStart has finished. Since there are many possible partitioning schemes, there are only a few default ones that can be customized to your needs.

Hard drive partitioning
Hard drive partitioning

After looking at this image you may be asking yourself what does the Windows and Linux partitions means. The answer is simple. A 101MB partition is created first and the Windows partition is created second. This way you can install a dual boot machine since we have left 101MB of space for the /boot partition of your linux install.

Select the OS and type of installation to perform

Now that you have a formatted partition, you need to select the OS and type of system that you want to install. In the image shown below, you can see that you could install Windows 2000 or Windows XP. The types of system allow you to install computers with specific software packages and customizations based on where or how the system will be used. You may need a type of system for Staff, another for a Laboratory and maybe one for Home if you support your user's home computers.

Selecting the OS and type of system to install
Selecting the OS and type of system to install

After clicking on the desired system type, the unattended installation will start and you will not need to interact with the computer any longer until the system is completely installed, patched and rebooted.

Winnt32.exe setup program copies files to hard drive

Step number 4 launches a specific batch script that runs the operating system setup application winnt32.exe. Each one of the different options from the previous step launches a different batch script that is pretty much identical but that uses a different answerfile. Also note that if you had selected to install Windows XP, then the winnt32.exe from the windows xp installation files (I386 folder) will be used to install the OS. If you were installing windows 2000, then the winnt32.exe application used will be that inside the 2000 setup files.

Winnt32.exe starts windows setup
Winnt32.exe starts windows setup

Winnt32.exe copies some files to the newly formatted C: drive as well as the appropriate answer file prior to rebooting. Do not confuse this section of the setup process with the GUI setup. At this point files are being copied to the hard drive to begin the Text Setup section of the installation process. If you look carefully at this image, you will find the Go menu on the bottom left corner which indicates that we are still running off the BartPE CD. After all files are copied the computer will reboot.

Text setup (a.k.a blue screen setup)

In this stage the real windows setup process occurs, which starts with the blue screen section of the setup process.

Text Setup (blue screen setup) section of the OS installation
Text Setup (blue screen setup) section of the OS installation

GUI setup begins

After the Text Setup section is finished, the computer reboots automatically to continue the GUI setup.

GUI Setup of the windows installation process
GUI Setup of the windows installation process

Batch scripts finish the installation

Up until this point we have just used built-in unattended installation capabilities included in Windows. However the answer file to install windows contains a section that looks as follows:

 Command0="net use Z: file:// /user:Sulley\installer mountP4DS /yes"
 Command1="cmd /K Z:\Scripts\SetTypes\WinXP\SetHomesystem.bat"

You can see what happens right after the machine boots with the Windows OS for the first time.

Batch scripts drive the installation process
Batch scripts drive the installation process

The final reboot

After all the software has been installed, the system configured and all updates applied, you need to reboot the computer so that all updates take effect. This is the final step of DiegoStart.

Final Reboot
Final Reboot

Batch script flow

DiegoStart is a process driven by batch scripts. There is a minimum number of scripts included in the BartPE cd so that you do not need to burn a new BartPE cd everytime a script is changed. The rest of the scripts are actually stored in the file server and are accessed by the clients through the mounted network share. Having the scripts in the server allows them to be modified and updated easily and efficiently.

Scripts in BartPE CD

The only scripts included in the BartPE cd itself are:

  • DSSon10.bat: Sets DiegoStart file server IP to and then runs mount.bat
  • DSSonIP.bat: Asks you for the file server IP and then runs mount.bat
  • mount.bat: Runs net use with the appropriate IP to mount file server. It also instructs user to reload the nu2menu so that DiegoStart scripts become available.

Partition Hard Drive

These scripts are used to create partitions on the hard drive and are stored in the folder D:\DiegoStart\winsetup\scripts\hddsetup.

  • XYGB.bat: XY is simply the size of the partition in gigabytes (10, 20, 30, etc). These scripts simply set an environment variable that is then used on the partition.bat script. The environment variable contains the name of the text file with the commands passed to the diskpart application that is responsible for partitioning the drive.
  • partition.bat: This script simply runs diskpart with the appropriate file to create the hard drive partitions. After the disk has been partitioned it formats the partition quickly with the NTFS filesystem.
  • CUSTOMPART.bat: It is a batch script that allows the user to enter a specified partition type. It creates a file with the diskpart commands in the %TEMP% folder and then it runs partition.bat
  • FULLDISK.bat: It simply creates one partition using all disk space.
  • KEEPPARTS.bat: It skips the partitioning section and simply formats the disk.

Start Setup scripts

Prior to the start of this section it is needed to make a clarification on the use of drive letters. D: is the drive letter used on the file server where all the DiegoStart files will be copied (see Downloads section in the How to). Z: is the drive letter used in the client computers to mount the winsetup folder and be able to run the scripts and install the software.

DiegoStart uses the winnt32.exe program to install the Windows operating systems. In order to be able to install different versions (2000, XP) and flavors of Windows (Home, Corporate, OEM), we use different scripts to start the setup process.

The only thing these scripts do is set the folder from where to run winnt32.exe and also select which answer file to use. Some of the system types included are Homesystem, Labsystem and Staffsystem. For example, the Homesystem.bat script for Windows XP Corporate look like:

@echo off
color 0E

call Z:\scripts\startsetup\winxp\homesystem.bat

Once the XPFLAVOR variable is set, the homesystem.bat script from the folder D:\DiegoStart\winsetup\scripts\startsetup\winxp\ is called which runs the winnt32.exe setup from the appropriate folder. Note that in the example above you see Z:\scripts\.... This is because the scripts are executed in the client computer which has the winsetup share mounted as the Z: drive as explained at the beginning of this section. Below you can see what the homesystem.bat script does:

@echo off
color 0E
echo Windows Setup will start in a moment...
start /wait Z:\cd\%XPFLAVOR%\I386\WINNT32.EXE  /unattend:Z:\answerFiles\winxp\%XPFLAVOR%\homesystem.txt /syspart:C: /tempdrive:C:
echo Computer will reboot in 3 seconds && sleep.exe 3
Z:\tools\peshuteject.exe /reboot

As you can see, the script above uses the XPFLAVOR variable to choose the windows installation files to be used as well as the appropriate answer file to choose between the different Home, Corporate and Pro Oem versions.

After the winnt32.exe program runs, the comptuer reboots using the peshuteject.exe program and installation continues from the computer's hard disk.

The Set Type scripts

After the operating system is installed, the computer logs in automatically and the [GuiRunOnce] scripts are executed. The reason we need separate answer files for each OS and FLAVOR is so that we can run separate settypes.bat scripts. Here is an example of the [GuiRunOnce] section taken out of the Windows XP answer file for a Home system:

   Command0="net use Z: \\\winsetup /user:installer mountP4DS /yes"
   Command1="cmd /K Z:\scripts\settypes\winxp\sethomesystem.bat"

You can see an example of the sethomesystem.bat script below:

echo off
color 0E
echo Starting Setup for Homesystem
cd Z:
set TYPE=Homesystem
set DSOS=WinXP
call Z:\scripts\common\mainsetup.bat

As you can see, we only set two variables here and then call the mainsetup.bat script

The mainsetup.bat script

It can be found at D:\DiegoStart\winsetup\scripts\common. This script is divided into 6 parts:

  1. Change permissions on C Drive: Adjusts permissions to restrict write access to C:
  2. Software Installation: Uses the DSOS variable to run the software.bat script for the appropriate version of windows being installed.
  3. OS Updates: Performs all updates that could not be slipstreamed in the install sources.
  4. Registry Entries: Adds registry entries to customize or secure the workstation.
  5. Shorcut fix: Groups and organizes Start Menu and desktop shortcuts.
  6. System Reboot: Performs a final reboot so that windows updates take effect.

The mainsetup script is the heart of DiegoStart and coordinates the installation process.

Software Installation scripts

Each version of Windows that can be DiegoStarted has its own Software.bat script to allow customization of different software packages per OS and per system Type. The software.bat script uses the %TYPE% variable to figure out what packages are install for each type of system.

There are sample commands to install several software packages on the software.bat scripts. In order to enable installation of the software you need to first configure the setup files and then uncomment the command by removing the REM entry from each line in the software.bat script.

There is also a script called osindsoftware.bat that can be found in your file server at D:\Diegostart\winsetup\scripts\common and that install software packages that work on all different OS versions. You should also look through the script to enable the installation of the applications you want. Detailed explanations on how to obtain or prepare the applications for unattended installation can be found in the Software section.

Personal tools