How-to: Create a universal windows XP image using mysysprep.exe and VM Ware

Discussion in 'Tutorials' started by ssx4life, Apr 8, 2012.

  1. ssx4life Member

    I decided to throw together a really quick video walk through of how to create a universal windows xp image using fog.

    In this demo walk through I'm using Windows XP Professional OEM + SP3 slipstreamed. I HIGHLY.... HIGHLY suggest that you use a vanilla OEM disk and NOT a stamped disk such as a dell / hp oem disk. These oem disks come with the hologram typically.

    It's also important to note that you can actually sysprep an OEM vanilla image. I'm using an OEM SLP key found here - , and runing oemscan.exe after the machine is imaged to fully activate it on oem hardware.

    To simplify things I've also included a copy of my sysprep folder (see below). This folder is ~50MB due to it including 2 driverpacks (mass storage / lan) for NT5 x86. It already has a pre-built sysprep.inf file you can edit and use for your own =)

    1. Create a Virtual Machine using Virtual Box or VM Ware.
    2. Make sure that the VM you create has an IDE hard drive option selected (not SCSI) and a SINGLE PROCESSOR with TWO CORES. Also make sure the lan is BRIDGED
    3. Install Windows XP Pro (OEM if you don't have a VLK), or VLK if you have that license agreement and key
    4. Run all updates on the computer, install any software, configure the OS the way you want / etc.
    5. Capture a snapshot of the OS using the software (VM Ware has this built in, as does virtualbox)
    6. Simply download and unzip the file and move it to C:\sysprep (if you are using windows xp pro vlk you will need to modify the supplied key)
    7. Run spdrvscn.exe and hit box #1, #2, #5 (save) and close the application
    8. Run sysprep.exe from a command prompt as follows "sysprep.exe -bmsd" This will run sysprep and pull all the mass storage drivers and lan drivers down into the sysprep.inf file
    9. Make any last changes you want to your image (if you are using a VM I suggest that you snapshot as you go along)
    10. Install the Fog client service
    11. Manually register the host by MAC address on the fog server. You can find this by running ipconfig /all
    12. Once registered assign it to a new computer image in fog, and select "upload"
    13. On the virtual machine run setupmgr.exe and modify the sysprep.inf to your liking (change the password / name / etc.)
    14. Once saved run mysysprep.exe and tick the box that says "run mini setup" as and then "reseal"
    15. Wait about 15-20 min's for sysprep to run and shut down the VM
    16. Turn the VM on and smash F12 on your keyboard to PXE boot the OS.
    17. FOG will now boot and capture the image. =) You are set! This image will now work on any model hardware you throw it at (well just about)

    The above steps are pretty cut and dry. If you have ever run sysprep.exe before on Windows XP most of this should be fairly familar to you. All that was added in this guide was we have added drivers using the sysprep driver scanner, and chanloaded mysysprep.exe instead of the standard sysprep.exe (giving us the ability to inject HAL's into the install).

    Required Files
    1. -
    2. oemscan.exe (only needed on oem builds of Pro. Run the .exe as a snapin or manually + reboot. It will then be activated if run on a supported oem system (dell hp / compaq / etc.) with a supported OEM SLP key -

    If you have any questions let me know.


    Thank you Boon for re-hosting / uploading these files while I was out of the states on work.

  2. danuel New Member

    Thank you!
    I will try that!!
    Best Regards!

    OK SYSPREP ok.
    But a question, what chipset I use on VirtualBox? PIIX3 or ICH9?
    And what type of IDEController? PIIX3 , PIIX4 or ICH6?

    Well, I am the Impacient guy haha.. I onlu need sometime, I think it's tima to SO update configs :O

    To finish the installation I only need put a RunOnce Command to delete the sysprep folder, or I'm wrong?
  3. boon Member

    Thanks for the quick walkthrough, SSX4LIFE!

    If I wanted an image to detect ALL hardware, do I need to add all additional display/sound/etc drivers to \sysprep\drivers before running spdrvscn?

    Thanks again for your help!
  4. ssx4life Member

    The sysprep folder auto-deletes when the computer boots for the first time. The folder, and anything inside of it auto delete
    danuel likes this.
  5. ssx4life Member

    @boon , yes in theory you could put all your needed drivers (.inf's) into the sysprep\drivers folder and inject them into your install so all sound /etc. get auto inserted.

    HOWEVER you need to be careful when you do this.

    #1. If you load the incorrect chipset driver for the OS it could BSOD on first boot (happens mostly with older dell models).
    #2. Sysprep.inf has a file limitation size of 2047 characters. Typically you can't throw all the needed drivers into the installation, so the way around this is to use the driverpacks method. You could place the driverpacks folder in C: or even use SFX Maker to encapsulate it as an .exe. Then simply use the runonce command to call the remaining drivers on first boot.

    I should note that in my sysprep folder that I included it has the driverpacks for mass storage and lan. Look here for the SAD_DP_INSTALL_TOOL script over on the forums -

    Download the .7z and open the readme.txt file. It's simple as downloading the driverpacks using a .torrent application and tossing the proper files in the x86 / x64 / nt5 folders.

    If you need more help or more info let me know, but be VERY careful of the sysprep character limitations.

  6. Mike New Member

    Where should I put the SAD2? In the C: folder?
  7. ssx4life Member

    Mike thanks for the email. If you want to have full driver support for Windows XP using the SAD method you can do it once of two ways.

    #1. Build a snapin for SAD2 using SFX Maker and push the .exe to the client computer, running the correct drivers
    #2. Place the SAD2 folder ANYWHERE but the sysprep folder. The root of C: would be just fine. I've seen people put it in C:\Drivers and then once the .cmd is run using the runonce command from sysprep they run a second script to delete the folder contents. A good example of this is andyroo on our forums who has a windows 7 walkthrough who also uses the driverpacks - . See his batch script below

    Delete drivers from C: (change "SAD2-111118" to what ever name you have your folder as)
    rd /s/q C:\D
    DEL /F /S /Q /A "C:\Drivers\SAD2-111118"
    rd /s/q C:\Drivers\SAD2-111118
    Don't forget you can create this .cmd file and place it in the same location as your driverpacks, and have it be run by sysprep (runonce command) It will not only delete itself, but take out anything inside the folder as well, leaving you with a clean installation.

    Let me know if you have any questions or need further help =)
  8. sid Member


    How do you insert the SATA driver into the image. this process will work if AHCI is disabled in the BIOS but what if it is enabled?
  9. ssx4life Member

    It should work either way I believe. The Mass Storage drivers included in the folder cover ATA and ACHI I believe.

    Give it a shot.
  10. boon Member

    We had to create a separate IDE image for some older devices that do not support AHCI. Otherwise we'd have to set BIOS SATA emulation to IDE on the majority of the machines.
  11. sid Member

    here is what I did, I used nlite and integrated the sata drivers and also all the drivers into the xp installation disk, then made an ISO file,
    using that ISO I installed windows xp on Sun Virtual Box, then I made a ghost image and tried it on 3 different machines with success, but still waiting on your link fix to download to try that too.
  12. ssx4life Member

    I have to dig up a copy of this file again, if I can't i'll have to re-create it (not hard I have a version in a VM I can use).

    give me a bit.

  13. SCSI New Member

    Great tutorial!

    Followed your steps but having issues adding the Lan and Masstorage devices in sysprep. After steps 7 and 8 (running spdrvscn v1.3.2 and then sysprep.exe -bmsd), sysprep.inf will contain the inf from C:\Windows\inf and only these three entries from C:\sysprep\drivers. Should there be more entries?

    **After scanning C:\sysprep\drivers with spdrvscn, it will report that there are 154 driver entries
    **C:\sysprep\drivers contains extracted drivers from DP_MassStorage_wnt5_x86-32_1203.7z and DP_LAN_wnt5_x86-32_1202.7z

    Can you please share your sysprep config? Thanks!
  14. ssx4life Member

    Ok so I found my two folders and I'll have those re-uploaded shortly.

    Sorry for the delay. Life has been busy, and I do this as a hobby on the side.
  15. buckITall Member

    Thanks for your time ssx...have you been able to upload the "" files yet, I can't seem to find the posted link.
  16. SMoRZ3 New Member

    Does anybody know where you can get an XP Pro OEM disc? I have a Dell version, but it doesn't take the Perserving OEM Actication key thats provided by Microsoft.

    Basically the version I have cant be activated, so then i cant do updates which makes using the VM useless as far as saving time...

  17. ssx4life Member

    @sid @buck @scsi

    I have been out of the states on work for the last 3 weeks. I won't be back till the 2nd week in July.

    I tried to wake on lan my pc at home, but the packet isn't getting to my server for some reason, and I can't remotely turn it on any other way.

    Once back I'll re-host these files.

    Thanks for being patient, I'll get back to you shortly on this.
  18. ssx4life Member

    Legally we can't distribute these due to copyright law.

    Please post your MGADIAG.exe logs so we can better help you =)
  19. danuel New Member

    Hi This links don't open, can upload files again please?

  20. boon Member

    SMoRZ3, buckITall and danuel like this.

Share This Page