Small useful scripts – OSD from USB without HAL.dll error (vbs)

This script only apply to Windows XP ( I know it’s going away soon, but people still use it!!), and just yesterday I answered a guy on TechNet who had this exact problem. So even though it’s almost obsolete I thought I put it up anyway!

In cases where you want to run OSD using a USB key, you will have to attach that KEY directly to the SCCM server, or if you are running from a console, attach it to the PC where you are running it from. So an easier solution is to just create a boot media ISO, and then copy the content of the ISO to the USB, making it quiet easy to distribute keys around the world, as the local IT-pros could then create their own key, without having access to SCCM. They just need to copy the files to the USB

Problem is the way SCCM creates the boot media.. For some reason the setup is not the same for CD and USB, even though the files look identical, some thing is changed on the USB to make it work during the boot from WinPE to full OS phase.

Investigating this, it turned up an interesting thing. Once I deployed an image using the USB created with file copy, the windows XP Boot.ini was set to boot from disk1 rather than disk0 whish of cause makes the setup fail..

To work around that problem, I asked our developer Jakob to create a script that would make sure the info in boot.ini always pointed to the correct DISK, by simply copy the correct syntax to boot.ini, if incorrect in the first place.


Just copy the syntax to a VBS file, and run it a the last step before “Setup Windows and Config.Mgr” in your Deploy XP Task Sequence, and there will be no more HAL.dll error messages!

You can download the script here as well

By |2012-02-15T14:19:00+00:00February 15th, 2012|OS Deployment|2 Comments

About the Author:

Michael Petersen
Twitter: @OSDeployLinkedin: Michael PetersenMicrosoft Community Contributor


  1. Joshua February 22, 2012 at 18:14 - Reply

    I’ve found that this problem only exists for me when using x86 boot media on a bootable UFD when applying Windows XP wim.

    I found the issue because we only used x64 UFD boot media until we ran into an old computer (happened to be Dell Latitude D420) that didn’t have a x64 processor. I had to create x86 boot media and found the issue.

    Was definitely a head scratcher, and I still don’t know the reason why this is only a problem using x86 UFD boot media applying Windows XP, but I am thankful for the script. We’ll give it a try this afternoon.

  2. brandon April 27, 2012 at 22:20 - Reply

    Could i please have detailed instructions on how to do this? I copies the file to my flashdrive what do i do now? im so confused 🙁

Leave A Comment