Specify a custom hardware drivers folder for the image to use.
- Create a custom hardware drivers folder for any drivers needed for the target system, for example, C:\Drivers.
- Open the "C:\sysprep\sysprep.inf" file in Notepad and add the following lines to the relevant sections (if the heading doesn’t exist, create it):
Note: OemPNPDriversPath points to the C:\Drivers folder created earlier.
- For organizational purposes, split up any custom driver files based on category.
- For example, all video drivers go under:
- C:\Drivers\video and network drivers under C:\Drivers\network.
- In each of those folders, the specific driver bundles are placed with their driver inf files.
- The latest nVIDIA drivers would go into:
- The last part would include the name of the .inf file.
- For example, for the latest nVIDIA driver, the path would be:
- In "sysprep.inf", the path would be written as "OemPNPDriversPath=drivers\video\nVidia\nv4_disp.inf"
Note: Do not forget the semi-colon as a separator.
- For the next driver, repeat the procedure by placing the path after the semi-colon without leaving a space. Once all the drivers are added, save the file.
- If mass storage devices have been added, run "Sysprep.exe -bmsd" to populate the [SysprepMassStorage] section with the Plug_and_Play_ID = path_to_device_inf_file entries from the driver *.inf files.
If the [SysprepMassStorage] section header exists in Sysprep.inf, and you run the Sysprep -bmsd command, then Sysprep populates the [SysprepMassStorage] section with the Plug_and_Play_ID = path_to_device_inf_file entries corresponding to the Plug and Play IDs of mass-storage devices specified in the Machine.inf, Scsi.inf, Pnpscsi.inf, and Mshdc.inf files. Sysprep builds the list of mass-storage devices; it does not install these devices in the critical device database or do any other processing.
After using the Sysprep -bmsd command to generate entries in the [SysprepMassStorage] section, you can delete items from this section before running Sysprep -reseal or Sysprep -factory. Installing a smaller number of items in the critical device database reduces the time required for this image to reboot into the operating system.
Do not use the -bmsd parameter with any other command-line parameters.