

-------------------------------------------------------------------------------------------
Windows PE 3.0 and 4.0 are no longer supported in this version of the HPE Scripting Toolkit
-------------------------------------------------------------------------------------------


-----------------------------------------------------------------
Windows PE 5.0/10.0 Support for HPE Scripting Toolkit x64 Edition
-----------------------------------------------------------------

The directory \x64\drivers\winpe50 contains the WinPE 5.0 drivers required by the tools contained in the Scripting Toolkit (hpdiscovery, conrep, etc.).
The directory \x64\drivers\winpe100 contains the WinPE 10.0 drivers required by the tools contained in the Scripting Toolkit (hpdiscovery, conrep, etc.).

There are two ways to add drivers to a WinPE image:

1) Offline Method (recommended)

   A. Mount the base WinPE image by using the dism.exe tool. For example:


         dism /mount-image /imagefile:c:\winpe\media\sources\boot.wim /index:1 /mountdir:c:\winpe\mount\
 

   B. Add all the drivers to the base WinPE image by using the dism /add-driver option. For example:


         dism /image:c:\winpe\mount /add-driver /driver:<path> /recurse
 
         where <path> is the root directory location of the driver files to be added.


   C. Unmount the WinPE image after the drivers have been added. For example:
   
        dism /unmount-image /mountdir:c:\winpe\mount /commit
   		
 
  
2) Online Method

   To add a driver to a running WinPE environment use the drvload tool:

        drvload.exe <inf_path>

   where <inf_path> is the path to a device driver INF file.


For detailed information on using WinPE see the Windows Assessment and Deployment Kit(ADK).



Windows PE 5.0/10.0 x64 Drivers Directory Structure
--------------------------------------------------
WinPE 5.0 base directory - \x64\drivers\winpe50
WinPE 10.0 base directory - \x64\drivers\winpe100


nic\b57              - HPE NC-Series Broadcom 1Gb NIC Driver
nic\bus_mlx4         - HPE NC-Series Mellanox 10GbE Bus Driver 
nic\bxnd             - HPE NC-Series Broadcom NIC Driver
nic\bnxtnd           - HPE Broadcom NetXtreme-E Driver
nic\e1r              - HPE NC-Series Intel E1R NIC Driver 
nic\evbd             - HPE NC-Series Broadcom 10Gb Virtual Bus Driver
nic\ixn              - HPE Intel ixn NIC Driver
nic\ixs              - HPE Intel ixs NIC Driver
nic\i40ea            - HPE Intel i40ea NIC Driver
nic\i40eb            - HPE Intel i40eb NIC Driver
nic\mlx4eth63        - HPE NC-Series Mellanox 10GbE NIC Driver 
nic\mlx5             - HPE Mellanox CX4LX Driver
nic\ocnd             - HPE NC-Series Emulex 10GbE NIC Driver
nic\qend             - HPE QLogic FastLinQ 25GbE NIC Driver
nic\qevbd            - HPE QLogic FastLinQ 25GbE Virtual Bus Driver
storage\be2iscsi     - HPE Emulex 10GbE iSCSI Driver
storage\bxfcoe       - HPE QLogic FCoE Offload Driver
storage\elxcna       - HPE StorageWorks FCoE for Emulex HBA Driver
storage\elxfc        - HPE StorageWorks FC for Emulex HBA Driver
storage\hpsa3        - HPE Dynamic Smart Array B140i RAID Controller Driver 
storage\hpcisss3     - HPE Smart Array 3 Controller Driver
storage\lsi_sas2     - HPE H2xx SAS/SATA HBA Driver
storage\megasas2     - HPE MegaSAS2 Storage Controller Driver
storage\ql2300       - HPE StorageWorks FC for QLogic HBA Driver
storage\smartpqi     - HPE Smart Array SmartPqi Controller Driver 
storage\smartdq      - HPE Smart Array SmartDQ Controller Driver 
system\hpqilo3chif   - HPE ProLiant iLO 3/4 Management Controller Driver (CHIF) 
system\hpqilo3core   - HPE ProLiant iLO 3/4 Management Controller Driver (CORE)
system\ilo5chif      - HPE ProLiant iLO 5 CHIF Driver 
system\ilo5asr       - HPE ProLiant iLO 5 ASR Driver 
system\hpsstkio      - HPE Toolkit I/O driver (no INF, file must be copied to windows\system32\drivers)

Note: Some utilities require WMI to be installed.  Please install the WMI Package in your WinPE environment.
See the WinPE documentation for details on installing extra packages in WinPE.



Windows PE Drivers Integration Sample
--------------------------------------------------

The following commands are sample steps to integrate the drivers into WinPE 5.0/10.0.
NOTE: Replace winpe50 with winpe100 for WinPE 10.0 integration for each command.

:: Open a WinPE Tools Command Prompt and create the base x64 WinPE image.
copype.cmd amd64 c:\winpe

:: Mount the image.
dism /mount-image /imagefile:c:\winpe\media\sources\boot.wim /index:1 /mountdir:c:\winpe\mount

:: For WinPE 5.0 ONLY
:: Add any packages that are needed.  WMI is required for the Toolkit utilities (conrep, hpdiscovery, etc.).
dism /image:C:\winpe\mount /Add-Package /PackagePath:"C:\Program Files (x86)\Windows Kits\8.1\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\WinPE_OCs\WinPE-wmi.cab"
dism /image:C:\winpe\mount /Add-Package /PackagePath:"C:\Program Files (x86)\Windows Kits\8.1\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\WinPE_OCs\en-us\WinPE-WMI_en-us.cab"
:: For HPDiscovery of iSCSI or Fibre Channel HBA information, the StorageWMI package is required.  This package has other dependent packages listed in order(WMI->NetFx->Scripting->PowerShell->StorageWMI).
dism /image:C:\winpe\mount /Add-Package /PackagePath:"C:\Program Files (x86)\Windows Kits\8.1\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\WinPE_OCs\WinPE-NetFx.cab"
dism /image:C:\winpe\mount /Add-Package /PackagePath:"C:\Program Files (x86)\Windows Kits\8.1\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\WinPE_OCs\en-us\WinPE-NetFx_en-us.cab"
dism /image:C:\winpe\mount /Add-Package /PackagePath:"C:\Program Files (x86)\Windows Kits\8.1\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\WinPE_OCs\WinPE-Scripting.cab"
dism /image:C:\winpe\mount /Add-Package /PackagePath:"C:\Program Files (x86)\Windows Kits\8.1\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\WinPE_OCs\en-us\WinPE-Scripting_en-us.cab"
dism /image:C:\winpe\mount /Add-Package /PackagePath:"C:\Program Files (x86)\Windows Kits\8.1\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\WinPE_OCs\WinPE-PowerShell.cab"
dism /image:C:\winpe\mount /Add-Package /PackagePath:"C:\Program Files (x86)\Windows Kits\8.1\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\WinPE_OCs\en-us\WinPE-PowerShell_en-us.cab"
dism /image:C:\winpe\mount /Add-Package /PackagePath:"C:\Program Files (x86)\Windows Kits\8.1\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\WinPE_OCs\WinPE-StorageWMI.cab"
dism /image:C:\winpe\mount /Add-Package /PackagePath:"C:\Program Files (x86)\Windows Kits\8.1\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\WinPE_OCs\en-us\WinPE-StorageWMI_en-us.cab"

:: For WinPE 10.0 ONLY
:: Add any packages that are needed.  WMI is required for the Toolkit utilities (conrep, hpdiscovery, etc.).
dism /image:C:\winpe\mount /Add-Package /PackagePath:"C:\Program Files (x86)\Windows Kits\10\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\WinPE_OCs\WinPE-wmi.cab"
dism /image:C:\winpe\mount /Add-Package /PackagePath:"C:\Program Files (x86)\Windows Kits\10\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\WinPE_OCs\en-us\WinPE-WMI_en-us.cab"
:: For HPDiscovery of iSCSI or Fibre Channel HBA information, the StorageWMI package is required.  This package has other dependent packages listed in order(WMI->NetFx->Scripting->PowerShell->StorageWMI).
dism /image:C:\winpe\mount /Add-Package /PackagePath:"C:\Program Files (x86)\Windows Kits\10\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\WinPE_OCs\WinPE-NetFx.cab"
dism /image:C:\winpe\mount /Add-Package /PackagePath:"C:\Program Files (x86)\Windows Kits\10\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\WinPE_OCs\en-us\WinPE-NetFx_en-us.cab"
dism /image:C:\winpe\mount /Add-Package /PackagePath:"C:\Program Files (x86)\Windows Kits\10\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\WinPE_OCs\WinPE-Scripting.cab"
dism /image:C:\winpe\mount /Add-Package /PackagePath:"C:\Program Files (x86)\Windows Kits\10\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\WinPE_OCs\en-us\WinPE-Scripting_en-us.cab"
dism /image:C:\winpe\mount /Add-Package /PackagePath:"C:\Program Files (x86)\Windows Kits\10\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\WinPE_OCs\WinPE-PowerShell.cab"
dism /image:C:\winpe\mount /Add-Package /PackagePath:"C:\Program Files (x86)\Windows Kits\10\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\WinPE_OCs\en-us\WinPE-PowerShell_en-us.cab"
dism /image:C:\winpe\mount /Add-Package /PackagePath:"C:\Program Files (x86)\Windows Kits\10\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\WinPE_OCs\WinPE-StorageWMI.cab"
dism /image:C:\winpe\mount /Add-Package /PackagePath:"C:\Program Files (x86)\Windows Kits\10\Assessment and Deployment Kit\Windows Preinstallation Environment\amd64\WinPE_OCs\en-us\WinPE-StorageWMI_en-us.cab"

:: Extract the x64 drivers from the Toolkit.

:: Integrate the HPE WinPE x64 drivers using the dism command. 
dism /image:c:\winpe\mount /add-driver /driver:c:\x64\drivers\winpe50 /recurse /ForceUnsigned

:: Copy the Toolkit I/O driver to the Windows driver directory (required for utilities).
copy c:\x64\drivers\winpe50\system\hpsstkio\hpsstkio.sys c:\winpe\mount\windows\system32\drivers

:: Edit the startnet.cmd file:
notepad c:\winpe\mount\windows\system32\startnet.cmd

:: Run wpeinit.exe and drvload of oem*.inf files (needed for system drivers).
:: Add the following lines to the startnet.cmd file:
wpeinit.exe
for /f %%F in ('dir /s /b /OD x:\windows\inf\oem*.inf') do drvload %%F

:: Save and close the file.
:: NOTE: Reloading some drivers (drvload oem*.inf) may cause errors.  These can be ignored since the drivers are already loaded by wpeinit.

:: Add any other files to the WinPE image that may be needed (such as the Toolkit tools in the c:\x64\tools directory).

:: Unmount the image and commit the changes to the image.
dism /unmount-image /mountdir:c:\winpe\mount /commit

:: Following the intructions in the Windows ADK to use MakeWinPEMedia to create bootable media(USB or ISO).

:: For USB flash drive(assigned to F:)
Makewinpemedia /ufd c:\winpe F:

:: For ISO Image
Makewinpemedia /iso c:\winpe c:\winpe_x64.iso
