# OSD_InjectXPMassStorage

> Injects mass storage drivers into a captured Windows 2000, XP, or Server 2003 image, which otherwise supports only the source computer's drivers.

Source: https://docs.capaone.com/capainstaller/vb-scripting-library/osd-scripting-library/osd-functions-osd/osd-injectxpmassstorage/  
Product: CapaInstaller — a separate CapaSystems product; do not apply this page to any other.

[VB Scripting Library](/capainstaller/vb-scripting-library/) > [OSD Scripting Library](/capainstaller/vb-scripting-library/osd-scripting-library/) > [OSD functions (OSD)](/capainstaller/vb-scripting-library/osd-scripting-library/osd-functions-osd/)

### OSD_InjectXPMassStorage()

When capturing images of Windows 2000, Windows XP, Windows Server 2003/2003R2, the image only supports the mass storage drivers installed of the source computer at capture time.   
Because of this, a new image must be captured each time a new mass storage driver is to be supported. To avoid this cumbersome and time consuming work, this function will inject any mass storage drivers located in the "C:\drivers" folder, into the target operating system.

### Arguments

No arguments provided.

### Return Type

Boolean, TRUE if function completed successfully.

### Remarks

Typpically used in the PreBootScript.wsf

### Example

The following example will inject any mass storage drivers added to the computer through the hardware model drivers, and update the HAL files as well.

**VBScript**

```vb
Private Function IncludeScript(sScriptFile)
 '...
End Function

'Begin
  bStatus=True
  If bStatus Then bStatus=IncludeScript("customlib.cis")
  If bStatus Then bStatus=IncludeLibrary("Capalib.cin")
  If bStatus Then bStatus=IncludeLibrary("Osdlib.cin")
  If bStatus Then bStatus=Job_Start("WS","Script Name","1.0","ScriptName.log","INSTALL")
  If bStatus Then bStatus=OSD_Initialize()

  If bStatus Then bStatus=OSD_InjectXPMassStorage()
  If bStatus Then bStatus=OSD_UpdateWindowsHAL()
  
  Job_End(bStatus)
'End main

```

### See Also

[Scripting Guidelines](/capainstaller/vb-scripting-library/scripting-guidelines/), [OSD_UpdateWindowsHAL](/capainstaller/vb-scripting-library/osd-scripting-library/osd-functions-osd/osd-updatewindowshal/) [Constants](/capainstaller/vb-scripting-library/addendum/constants/) [Package Property](/capainstaller/vb-scripting-library/addendum/package-property/) [Variables](/capainstaller/vb-scripting-library/addendum/variables/)
