OSD\_InjectXPMassStorage
VB Scripting Library > OSD Scripting Library > OSD functions (OSD)
OSD_InjectXPMassStorage()
Section titled “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
Section titled “Arguments”No arguments provided.
Return Type
Section titled “Return Type”Boolean, TRUE if function completed successfully.
Remarks
Section titled “Remarks”Typpically used in the PreBootScript.wsf
Example
Section titled “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.
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 mainSee Also
Section titled “See Also”Scripting Guidelines, OSD_UpdateWindowsHAL