Injecting Intel Storage Drivers into XP WIMs via MDT

Update 19 August 2011 – I’ve made the decision to only offer my “next generation” refinements on a licensed basis. This includes support for MDT 2012, X64 support,multiple driver support, AMD/SCSI, etc. If you want to discuss your specific needs please drop me a note. I will continue to offer the old version found below for free for those who find it fits their needs despite its limitations.

Update 15 July 2011 – I’ve begun testing this solution within MDT 2012 Beta 1. I intend to make several major enhancements, such as supporting XP x64 and supporting the installation of different versions of the Intel SATA driver for different hardware models using rules. I’m also looking at supporting the AMD sata drivers.

Update 18 Mar 2009 – I have now confirmed that this solution works without modification in MDT 2010 as well as MDT 2008.

This script will allow you to inject Intel’s SATA drivers into all of your XP WIMs: automatically, on-the-fly at deployment time. No more blue screens because the storage driver for the model your image needs to work on wasn’t available when it was built.

You will no longer have to refresh your core image with the newest Intel SATA driver every time you need to add support for a new storage device. Every XP WIM you need to deploy can now boot on machines with either AHCI, RAID, or Compatibility SATA modes enabled.

This was done in a hurry and I admit it has some pretty sloppy coding. I took some pretty ugly shortcuts in the INF parsing and made a number of assumptions to reduce development time to the bare minimum. As such it may need modifications to paths and folders to work in your environment. It only supports the Intel 32-bit storage driver at this time but it can probably be made to work with storage drivers from other vendors with a little research and some minimal changes to the actual code. I’ve actually been using this for about a year now and it has worked with the last three or four Intel SATA driver releases without modifications so I’m guessing  this will continue to be the case for the forseeable future.

1. Download this .zip file and then extract the .wsf file within and place it inside Distribution$\Scripts on your MDT server.

2. If the XP image in the WIM file was NOT built using BDD/MDT, you will need to inspect the contents of HKLM\Software\Microsoft\Windows\CurrentVersion\Setup\SourcePath and modify the two lines in the wsf which refer to “c:\windows\source” to reflect the location of the Xp source files on your image. Note: If your SourcePath currently points to a removable drive, you will need to mount your XP image w/ imagex, load the c:\windows\system32\config\SOFTWARE hive using regedit, and modify that key to point to a local folder in order for this solution to work properly. The i386 files will also need to be placed in that same folder. A future version of the script will be able to address these shortcomings automatically.

3. Create a Drivers folder in Distribution\Scripts and put a copy of all the files from Intel’s latest storage driver 32-bit boot floppy image inside of it.

4. Add the new script as a “Run Command” item to your XP deployment (not capture, although that might work too) task sequences. Place it in the Post Install phase, i.e. immediately after the built-in Driver Injection task sequence item.

New Task Sequence Item

5. When you need to update the SATA drivers, simply refresh the contents of the Distribution\Scripts\Drivers folder with the newest version of the drivers and then update your deployment point(s) again. You will still need to maintain the Intel storage driver(s) in your Out-of-Box section so it will be included in your boot images.


Tags: , , , , , , , , , , , , , , ,

98 Responses to “Injecting Intel Storage Drivers into XP WIMs via MDT”

  1. Fred Says:

    Thanks so much for this script! I had to actually put it in the Post Install Phase as the Windows directories don’t exist until after the wim is loaded. Besides formatting of the script worked like a charm! Great work.

  2. ruhle Says:

    Thanks Fred – that was indeed a typo in step 3 which I have now corrected – thanks for the feedback. I hope this makes maintaining your images a little easier.

  3. Fred (different Fred) Says:

    Rather than create a drivers directory, couldn’t the script just point to the drivers already loaded in MDT?

  4. Freesman Says:

    Hi! Can you send me a copy of working script file, I very need this script but it not working for me. In smsts log file : <![LOG[Failed to run the action: WIM Injection.
    Incorrect function. (Error: 00000001; Source: Windows)
    Task sequence execution failed with error code 80004005]


    • ruhle Says:

      I’ve emailed you a copy and also changed some of the wording around in the article and added a screenshot showing the task sequence configuration. Hopefully this will help.

  5. Chris Says:

    Is this referring to MDT 2010?

    Thanks this will be great!

  6. sebvieux Says:

    Hi ruhle,

    Can you send me the same package by email ?

    Thanks in advance.

  7. Trent Says:

    Just to clarify these steps are to take your current .wim image (the one used to image all your workstations) and inject/add new Mass Storage Drivers to support new hardware? All of this without have to add the new drivers and recapture your “Gold” image?

    Thanks for the help!!!

  8. Trent Says:

    I’m having an issue when I’m trying to refresh or reimage a workstation after I have added the command to the Task Sequence.

    In both the ‘BDD.log’ and ‘LiteTouch.log’ files (within C:\MININT\SMSOSD\OSDLOGS) I am receiving the following error:
    “ZTI ERROR – Non-zero error return code by LiteTouch, rc = -2147467259”

    The image begins and formats the drive, loads the drivers and starts to install the OS. During the OS installation phase is where the process is aborted. The workstation does not reboot or give a BSOD, it just dumps the imaging process and comes back to the command prompt where ‘wpeinit’ was ran from.

    I do notice that the ZTIWIMInjection.wsf file is not copied locally, though I’m not sure it should be. I also looked through the sysprep.inf file and verified the proper Mass Storage Drivers are located within the file.

    Do you have any thoughts or suggestions for me?

    Thanks in advance!

    • ruhle Says:

      If you remove the driver injection item from the task sequence does the image then deploy correctly?

      • Trent Says:

        Yes, the workstations will properly image if I disable or remove the step from the Task Sequence.

      • ruhle Says:

        Email the task sequence .XML and the bdd.log to ruhle at hotmail dot com and I’ll take a look when I have some time. My hunch is maybe the command line in the task sequence item isn’t correct perhaps?

  9. ruhle Says:

    Also it is normal that the script isn’t copied locally. It is typically executed from the DP share.

  10. Franz Says:

    Thanks for sharing the script, would be an ideal solution if it works. But it doesn’t, have exactely the same problem as Trent

    The script is executed, sysprep.inf is populated, so ztiwiminjection.wsf seems to be executed, but I’m getting the red summary screen with errors 2147467259 0x80004005 and the task sequence stops. Below are the relevant lines from BDD.LOG:

    component=”ZTIdrivers” context=”” type=”1″ thread=”” file=”ZTIdrivers”>


    • ruhle Says:

      I need the bdd.log and the task sequence XML file in order to troubleshoot anything. ZTIdrivers has nothing to do with this solution, nor does sysprep.inf, so you can’t really deduct anything by the success or failure of any operations involving those. You might want to try building from an empty task sequence and add only this item…it will make it far easier to troubleshoot. If you aren’t even getting a ztiwiminjection.log generated, then the script is not being called by the task sequence due to a typo or you didn’t put it in the correct location, or something was dropped when you pasted the script (another poster indicated he did have to do some formatting fix-ups.)

      It also sounds as if you are putting this in your capture task sequence since you refer to sysprep.inf. It needs to go into the deployment task sequence. If you are not capturing a custom XP WIM with one task sequence, and then deploying that WIM with another task sequence, this solution simply does not apply. The native storage injection should suffice in those cases where you may be building the machines directly from the XP source media, and not capturing reference WIMs and then customing/deploying those w/ a separate task sequence.

  11. ruhle Says:

    I’ve removed the code previously embedded in the blog because WordPress was doing a real number on the formatting of that code so it wouldn’t work until the ` were changed to ‘ and so on. Step 1 now has a direct download to a zipped up copy of the script. This should make things easier for the folks who aren’t familiar with vbscript.

  12. Trent Says:

    I’ve attempted to download the .zip file on several different workstations and it appears to be emtpy. Would you be able to email the file to me directly?

  13. Franz Says:

    Any news regarding 2147467259 0×80004005 error?

    Even with the new script, have still red summary screen with 2147467259 0×80004005 error, and task sequence stops. Have recreated completely new task sequence, based on “standard client task sequence” template. Have send you all required files a week ago.

    • Trent Says:


      I’m having the exact same issue. I have also created a new Task Sequence and have tried the new script, but each time I receive the following:
      “Non-zero return code executing command “X:\Deploy\Tools\X86\TsmBootstrap.exe” /env:SAStart, rc = -2147467259.
      LTI deployment failed, rc = -2147467259″

      If you discover a fix would you please let me know? My address is ‘’

  14. ruhle Says:

    Franz I never received any logs from you. Please resend them.

    Trent please confirm the following:

    1. The distribution point share Scripts folder contains ztiwiminjection.wsf. Also make sure you don’t have “hide filename extentions” enabled in explorer or else the name may look correct but it will actually be named ztiwiminjection.wsf.wsf or similar, which will cause the error you are experiencing.

    2. Make sure the Scripts folder contains a Drivers folder with the iastor.sys file and all the other files from the 32-bit SATA boot floppy supplied by Intel.

    3. Make sure you have done a full update on the DP containing that task sequence if you haven’t already.

    This error is typically caused by a missing file, caused either by a typo in the command line (and I could tell from Trent’s log that was not the case) or the file is missing/misnamed in the distribution point’s share folder.

    • Trent Says:

      Sorry for the long delay, but I found a lot of work waiting for me after Christmas break!

      To answer your questions:
      1.) The ‘ZTIWIMInjection.wsf’ file is named correctly and I am viewing all file extensions.

      2.) the “%SCRIPTROOT%\Drivers” directory exists and has the latest Intel Mass Storage Drivers expanded; version

      3.) I have done a ‘Full Update’ and update my WDS boot image accordingly.

      After checking all of these settings I am still getting the same error code. Any additional thoughts before I toss my hands up in defeat?


      • ruhle Says:

        1. Are you using the latest version of the script? I had updated it a couple of weeks back to troubleshoot Franz’ issue so it grabs a lot more info into the log.

        2. Does the image you are deploying have a c:\windows\source folder?

        3. Do you have a ztiwiminjection.log file in c:\minint\smsosd\logs or c:\windows\temp\deploymentlogs?

        The other fellow’s problem was caused by his registry containing a setting to pull drivers from a removable drive that wasn’t available and it was missing c:\windows\source. Does your image have a c:\windows\source folder? It may not if it wasn’t created in BDD/MDT and that will cause a failure until a line in the script is modified to point to the folder containing the i386 folder.


  15. Franz Says:

    Have emailed you the requested files.

  16. Naz Says:

    I am getting a similar issue to trent and franz

    I am getting the following red screen summary

    Non Zero return code executing command “X:\Deploy\Tools\X86\TSMBootstrap.exe” /env:SAStart. Rc = -2147467259

    the bdd log file says that the windows\source, windows\system32\drivers and windows\inf folders do not exist

    any ideas what I need to do to fix this??

    also how do I get hold of logs from the failed PC to email you if need be?


    • Naz Says:

      Ok – so I accidently put the script into pre install phase as opposed to post installed
      n e ways – update files on the deployment and ran again – still failed later on with the same message but this time when I check the log file for your script the windws\system32\drivers and windows\INF folder exits but the Windows\source folder does not?

      how can this be????
      what am I missing here


      • Naz Says:

        Good news,

        I got it to work.
        I followed step 2 in the instructions – changed the entry in the regsitry for sourcepath and created a folder in the image windows driectory called source, copied the i386 folder in here.

        all is good now – well – storage drivers anyway

        Thanks David

    • Ramon Says:


      What exactly did you do?


  17. TheBigUke Says:

    Worked first time … thanks!

  18. Joe Says:

    Great script, this was just what I was looking for. Thanks much man, it’s really appreciated.

  19. TheBigUke Says:

    I noticed you have a custom script to install tablet PC components. Have you found a way to use the default XPSP3 ISO and just inject these components without having to create a complete separate image?

  20. Mark Dayton Says:

    Great script, worked first time. Just what i was looking for!

  21. Sebastien Says:

    Could I have the updated script as well ??
    I’m trying to inject the AHCI drivers… Does your script work for these drivers or only for the iastor ones ?

    Thanks !

    • ruhle Says:

      The link will download the updated version. It will work for both ahci and raid mode.

      • Sebastien Says:

        Do I need to modify the script in any way??
        Here’s what I did and what I would like to do!

        I use MDT 2010 to build my reference PC in IDE mode and added the AHCI driver to C:\Drivers. Then I captured my image using SMS 2003 and created a ZTI image package. If I switch back my PC to AHCI mode in the BIOS and I re-image that same PC everything work fine.

        Now I would like to use MDT 2010 to build, capture and image my PC. So I use the same build method, copying the Drivers into C:\Drivers, capture my wim file and created a ne Operating system using that wim file. But when I try to image it, at the end of the image process it just reboot in a loop and never goes to the mini setup.

        I’ve tried to incorporate your script to my task sequence but I get the same result.

        Is there anything I should do differently?


      • ruhle Says:

        You’ll need to send me the following from your deployment DP in order to troubleshoot:

        a screenshot of your deployment point’s scripts folder and the drivers folder within that
        the ts.xml file
        the bdd.log file

  22. hobbes Says:

    This looks like it could be total a lifesaver for my 0xc0000017 error when running lite-touch builds. It annoyingly crashes before doing the install begins, right after it’s copied up all the data onto the virtual drive. presumably as it can’t find the correct storage driver. (Despite me copying every driver known to man into the Deployment Workbench.)
    The worst bit is that it worked for 18 months until I added the drivers for a new HP laptop. Now it doesn’t work for anything at all, including older kit.
    (I put it up here, which is where I got tipped off about this thread.)

    two questions: Is this the best set of storage drivers to use?

    And should I update my wim file using Deployment Workbench before trying another machine?



  23. Hugh Says:

    Care to publish those other custom scripts?

  24. MIke Says:

    Hello when I create the c:\windows\source folder am I suppose to but anything in this folder or just leave it blank?

  25. Steve Says:

    Have you tried to get a version for xp 64bit working. What parts of the code might need to be changed?

  26. Aaron Says:

    Great script. Works perfectly for me. Code was easy enough to follow. Big thx!

  27. koi Says:

    Ruth, couldI have a copy of the updated script and quide?

  28. Julien Says:

    Thanks for this great script!! Very Usefull and Time saving !

    I just need to do the same thing with AMD AHCI controller 🙂

    Do you work on this issue ?

    I need to work on your script to adapt the solution..

  29. Karl furgerot Says:


    I have some problem with the AHCI Injection. i put the task sequence in the MDT deployment. All is fine, but when the computer restart in sysprep mode, i ve got the bluescreen.

    In the log of mdt the script seems to run correctly. Do you configure the BIOS in AHCI mode after the sysprep installation or not?

    Can i ve the new version of the script?

    Thank you

  30. Jason Rice Says:

    In concern to this error posted by Franz:
    “Non-zero return code executing command “X:\Deploy\Tools\X86\TsmBootstrap.exe” /env:SAStart, rc = -2147467259.
    LTI deployment failed, rc = -2147467259″

    Please check that you have deleted the Hidden folder called C:\Drivers from your last image attempt.


  31. djhicks1 Says:

    Question? I have about 40 makes\models to support and they do not all use intel controllers. Is there a way that I can modify this script to include other branded controllers as well? I figured if I just add additional sections for each folder (there are alot of them) that it would do the trick. I know you cannot wild card subdirectories… was not sure if there was an easier way.

  32. Ahay Says:

    What happens if you have multipe SATA drivers?

  33. Patrik Folkesson Says:

    Is there anyone that managed the script to work with different vendors than Intel? Vmware-, virtualbox- and amd-drivers would be assum.

  34. MDT Sticky...? MDT Says:

    […] comprehensive, but contains some old stuff) Drivers Assign Drivers to Computer Makes and Models Injecting Intel Storage Drivers into XP WIMs via MDT Injecting VMware drivers into your Windows 7/2008 R2 install discs Lite Touch Driver Management […]

  35. Roger Says:

    i have done this and have to add \windows\source and copy i386 folder into this even i make the wim image in a mdt capture this folder was missing. before i did that i get error at TS halt. BUT the PC – Dell Optiplex 790 still bluescreen after first reboot

  36. Roger Says:

    I have solved this, did a clean in diskpart

  37. kelly Says:

    I can not get this to work It was at one time now when the disk comes up it is mis aligned and just boot loops. IF I selevt ATA it images no problem then I can switch to AHCI after

  38. Derek Says:

    I am in a situation that this would be a great solution for my environment. I had to mount the image and create the C;/Windows/Source folder, but am still unclear if I leave it empty or if I need to put something in there.

    Also, I’m unclear about your step two above. The following registry key does not exist in my wim image.


    Do I need to create it by loading the hive in regedit, and do I also need to put a key (or keys) in this?
    Clarification would be appreciated!


    • ruhle Says:

      Place the XP i386 folder inside of c:\windows\source. Not the contents, the i386 folder.

      You will need to add the sourcepath key by mounting the wim offline and loading the hive via regedit. Populating the key will direct XP to the c:\windows\source folder you added for installation files.

      • Derek Says:

        So in C:\Windows\Source, am I just making an empty folder called i386 there, or is it the i386 with all the contents there?

        And as far as the key, are we talking making a SourcePath directory under setup, and inside SourcePath make a String Value called “SourcePath” and setting the value to “C:\Windows\Source”?

      • Derek Says:

        I should have just tried it before asking questions…but I got the script to work.

        The i386 folder (with all the contents) goes inside the C:\Windows\Source folder that I created.

        The registry key SourcePath needs to be set to C:\Windows\Source (since that is where I put the i386 folder. It all makes sense now!

        I at least got my MDT image to deploy and is currently running the sysprep setup. Lets hope encryption installs correctly, than I will have fixed a huge problem!

        Regardless, you are awesome. Thanks so much!

  39. lelflieb Says:


    The link isn’t working at the moment. Is there another way to get the script file?

  40. leflieb Says:


    How can I get the zip file?

  41. Kevin Says:

    Hi ruhle,
    Scirpt looks like it would be really helpful.
    Any chance you could send it to me whilst the link is still down?

  42. Stelmer Says:

    Is there a new download link?

  43. bob Says:

    Still dead any chance of putting the code on the page perhaps so it’s all in one place.

  44. dyan Says:

    Would you please email me the lastst script and guide? Thanks!

  45. dyan Says:

    The link is still down? Any way to get the zip file? Thanks!

  46. Paul Says:

    The link is down 😦 Really would like to try implementing this Thanks 🙂

  47. BRB Says:

    I have the same problem.

    Incorrect function. (Error: 00000001; Source: Windows)
    Task sequence execution failed with error code 80004005]

    Script version 1.0

    Done so far.
    HKLM\Software\Microsoft\Windows\CurrentVersion\Setup\SourcePath to refer to “c:\windows\source”
    Copy folder contens from i386 to “c:\windows\source”

    Perhaps I need a newer script?

    Hoping for some help.


  48. Georg Says:

    The Link is down, Would you please email the zipfile

  49. BRB Says:

    Started all over and made an Image from scratch with MDT.
    Now it uploads the Image and when I deploy the Image, and after the first reboot, it wont start.
    “Windows did not start properly. This may be because there has recently been a change of computer hardware or software.”

    Link to the log file.

    Kind regards

  50. thogunde Says:

    Looks like it ist still still down. Possible to get the files some way?

  51. Cstone Says:

    Anyone get a hold of this script yet? I would like to get it as well.

  52. Hal Says:


    You’re script sounds like it would be a life saver for the 7b error I’ve be struggling with for longer than I would like to admit.

    The link in step 1 is no longer valid, so could you please send me the download for your script and any updated instructions. I would be most greatful for the help.


  53. drappleyea Says:

    The link is dead. COuld this be updated?


  54. dyan Says:

    I need help on adding the new storage driver to the exist core imag wim file. The new storage driver in out of box of MDT 2010 could not installed at deploy, cause all new machines BSOD on AHCI mode.

  55. Steve Saunders Says:

    The link is still down? Any way to get the zip file? Thanks!

  56. Damien Says:

    Hi please can you email me the script, or a place to purchase it from if needs be.

    Kind regards

  57. reparacion de pc Says:

    reparacion de pc…

    […]Injecting Intel Storage Drivers into XP WIMs via MDT « Ruhle's Blog[…]…

  58. facebook Says:


    […]Injecting Intel Storage Drivers into XP WIMs via MDT « Ruhle's Blog[…]…

  59. Silberankauf Says:


    […]Injecting Intel Storage Drivers into XP WIMs via MDT « Ruhle's Blog[…]…

  60. Bo Lendal Says:

    Hi Ruhle

    Im having the same problem as described above, could you please send me the new script, as i think it will be the solution, if tou need further information, please tell me exactly whot you need.

  61. bolendal Says:

    Hi Ruhle

    Could you please email me the new script, as im having a bit of struggle, using this one, i think my problem is the same as described above, in more than one post, so please email me the new script, thanks in advance, i’ll of cause post my result, when i have tested the new script.

  62. Richard Says:

    I’m using MDT 2012 and it does not appear to be working. I have a followed all your steps precisely. The registry is correct and the i386 folder (and contents) is in place. The script reflects the correct location of the source folder and I have a drivers folder in my deploymentshare\scripts folder and drivers in that folder.
    I am receiving the error:

    Incorrect function. (Error: 00000001; Source: Windows)
    Task sequence execution failed with error code 80004005]

    I’m wondering if the script just doesn’t work with 2012?

    Any help would be greatly appreciated, I’m about the pound my head into my monitor!

  63. Maxime Says:

    I just found out about your handsome script. Thank you.

    Nevertheless, I have some question about the script :

    – If i really understood the script, the injection of AHCI driver is made only for the master captured image (.vim) I want to deploy on all my computer ?
    – I have to update my master image and rerun this script every time a new computer with specific AHCI driver arrives ?

  64. Larry D Says:

    Thank you for this it saved me alot of time. It worked prefectly the first time.

  65. BRB Says:

    What do I do when I have 2 dirrerent machines that uses 2 differents iaAHCI.inf files?

    Kind regards

  66. 10 day weather in fuengirola spain Says:

    We absolutely love your blog and find almost all of your post’s to be just what I’m

    looking for. Would you offer guest writers to write content for you

    personally? I wouldn’t mind creating

    a post or elaborating on a few of the subjects you write

    in relation to here. Again, awesome web site!

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: