Skip to content

OSD_InjectClassNetDriver

VB Scripting Library > OSD Scripting Library > OSD functions (OSD)

Will install all net adapter drivers available from the C:\Drivers folder.
The function searches the Drivers folder on the drive the image is deployed to, including subfolders, for INF files of the class Net. It adds each driver to the deployed image with DISM.

No arguments provided.

Boolean, TRUE if function completed successfully.

This function is called from PreBootScript.wsf

If the Drivers folder doesn’t exist, the function writes a message to the log and does nothing.

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_InjectClassNetDriver()
Job_End(bStatus)
'End main

Scripting Guidelines, OSD_IsServer Constants Package Property Variables