Skip to content


Deploying Windows Image Universally to Different Hardware (Different HAL, IDE or SATA or SCSI)

How much time does it take to install Windows XP? And the service pack? And the programs, plus settings, and other things? 3-4 hours? And considering the problems like spyware, malicious software problems, or the “natural” problems of Windows like getting slow after 1-2 months, crashing for no reason; how many times do you have to go through this installation procedure in a year? Well, multiply this with the number of computers you own. Lots of time gone for configuring.. Well, there is a very easy way of creating a universal image of Windows Xp with all the programs and configurations you want, and it can be deployed in just minutes!

What you will need to create a universal Windows XP image:

1-) Windows XP Cd
2-) Optional: Service Packs or any programs you want to install
3-) An imaging software (like Acronis TrueImage or Norton Ghost)
4-) Optional: Preferably a Virtual Machine. I do my imaging in Virtual Machine, but you can use your own computer to get the image. I use Sun VirtualBox

Steps to take to create your XP image:

Preliminary Step: If you are using a virtual machine, make sure you select the correct Disk Controller. If you want to use your image on SATA drives, select SATA driver in the settings, or else select IDE.

0-) Install Windows XP to your computer or virtual computer.
1-) Install your drivers. If you want, you can download driver packs to support other hardware. Here’s how to integrate driverpacks into your XP image:
a-)Download DriverPacks BASE (and other driver packs you want) from driverpacks.net
b-)Unzip the driver packs to C:D folder. Each driver pack will contain a single inf file in the 7z file, extract those inf files to C:
c-)Extract the driver packs base to somewhere in C:
d-)Open “bin” folder in the driverpack base folder. Copy DPsFnshr.ini and extract DPsFnshr.7Z to C:
e-)Inside the driverpack base folder, open wnt5_x86-32 folder. Copy ROE.exe to C:\sysprep and extract DevPath.exe from M2.7z to C:
d-)Run command prompt (write cmd to Run in Start menu) Enter C:\DevPath.exe C:D
e-)Then execute this command: C:\makePNF.exe C:\D (this will take a while since it’ll integrate all the drivers into your Windows installation)

f-)Open C:\DPsFnshr.ini in notepad and find this line:

KTD = "false"

Make sure it’s set to false.
2-) Install your programs, service packs, do your configuration.
3-) Download Sysprep from Microsoft for XP SP3
4-) Extract it to C:sysprep
5-) Run setupmgr.exe from sysprep directory.
6-) Select Create new, then Sysprep Setup then choose Windows Xp, then choose “Yes, fully automate the installation”
7-) Enter your choices in the next windows, i.e product key, network settings, locale settings etc.
8-) Click Finish and it’ll save the inf, then click Cancel.
10-) Open sysprep.inf that was generated by the setup. It should be in c:\sysprep\sysprep.inf
11-) Add these two lines in the [unattended] section


UpdateInstalledDrivers=Yes
DriverSigningPolicy=Ignore 

12-) Add this line at the end of the sysprep.inf (Make sure no spaces exist between braces)

[SysprepMassStorage]

13-) Go to Start->Run. Enter “c:\sysprep\sysprep.exe -bmsd” and hit Enter. It’ll take some time to create the mass storage drivers section

14-) If you don’t want to integrate DriverPacks MassStorage pack, go to step 17.

15-) Save this script as HWIDS.cmd under C:

rem %1 is path to MassDriverPacks Folder
IF "%1"=="" GOTO EOF
IF NOT EXIST %1 GOTO EOF

SETLOCAL ENABLEDELAYEDEXPANSION
SET STDOUT=%cd%HWIDS.TXT
TYPE>%STDOUT% 2>NUL

::traverse drivers path
CALL :TRAVERSAL %1

GOTO EOF

:TRAVERSAL
PUSHD %1
for /f %%f in ('Dir /b *.inf') do (
for /f "eol=- tokens=2 delims=," %%i in ('find /i "pciven" %%f') do (
for /f "tokens=*" %%j in ("%%i") do (
for /f "tokens=1* delims=_" %%k in ("%%j") do (
if /i "%%k" EQU "PCIVEN" (
for /f "usebackq tokens=1* delims=; " %%a in ('%%j') do (
echo %%a=%cd%%%f>>%STDOUT%
)
)
)
)
)
)

FOR /F %%I IN ('DIR /AD /OGN /B') DO (
CALL :TRAVERSAL %CD%%%I
)
POPD
GOTO EOF

:EOF

16-) Run this script as: “C:\HWIDS.cmd D\M” It’ll generate HWIDS.txt. Copy everything in that file to c:\sysprep\sysprep.inf, at the end of [SysprepMassStorage] section. Make sure there are no extra spaces between items; i.e PCI_VEN&blabla = C:\D\Mblabla.inf <–Delete the extra spaces if any.
17-) Go to Start-Run. Enter “C:\sysprep\ROE.exe 937″ After this step, you should NOT reboot your computer!
18-) Download Hal Updater
19-) Extract it to C:\HalUpdater and run HalU.exe. Choose “Standard PC” and update your HAL , but DONT reboot your computer.
20-) Go to Start-Run. Enter regedit. Go to HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\RunOnceEx and open the key 937. Add a string value, enter 2 for the name, and C:\HALu\HALu.exe for the value. We add this key so that in the next reboot, the user can choose his corresponding HAL (Dual core computers should choose ACPI Multiprocessor), but we choose Standard PC for now to be able to install our image on other PC’s too. So if you are certain that you won’t install your image on old PC’s, you can skip this step and keep your HAL as is. But your image wont work on other type of CPU’s.
21-) Final step. Go to Start-Run. Enter “C:\sysprep\sysprep.exe” Click Reseal. This will take some time, maybe some hours. After this step, your computer will shut down. Don’t reboot your computer.
22-) Download Acronis True Image or Norton Ghost. Create a Bootable Rescue Media ISO, attach it to your virtual machine (or write it to a CD and boot with it). Get a back up image of your drive.
23-) Add that image to your bootable rescue media ISO file. Write it to a CD/DVD.
24-) Boot any computer you want with that CD and restore your image. Boom! You have your image deployed in minutes!

Enjoy the automation,
Bora Bilgin

Posted in Blog Posts, Operating Systems and Software, Own Projects, Projects.

Tagged with , , , , , , , .


9 Responses

Stay in touch with the conversation, subscribe to the RSS feed for comments on this post.

  1. Sadiq says

    Cant download Halu.zip from rapidshare

  2. Sadiq says

    I cant download the Halu.zip from fileshare .Please send it to me by mail.
    sadkk@hotmail.com

  3. Judas Schwarz says

    Having problems making this work. Would you please correspong with me on this process ? Thanks.

  4. Abhijit Naik says

    Steps no 8 and 9 are not mentioned.
    Please upload the screen shots.

  5. Bora Bilgin says

    @Abhijit Naik: Step 8 is the line that starts with “Click Finish”. I think step 10 should be step 9. Will update that, thanks.

  6. Bora Bilgin says

    @Judas Schwarz, what problem are you experiencing?

  7. Bora Bilgin says

    @Sadiq: just search google for “halu.zip” or HAL UPDATER, you’ll find it.

  8. Mark says

    @Bora: Your hwids.cmd script is missing backslashes in a few places. For anyone else having trouble, http://wiki.education.ucsb.edu/SysPrep has a copy that is correct.



Some HTML is OK

or, reply to this post via trackback.



Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported
This work by Bora Bilgin is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported.