Adding mass storage device drivers to WinPE just got easier. One of the biggest benefits of Deployment Server 6.9 is that I get the flexibility of WinPE 2.1! I go to put one of my servers in automation and it turns out my Silicon Image Raid controller is not natively supported as well as the default NICs of my VMware clients. I found the Vista drivers for my SiI3x12 and vmxnet. Now I just need to inject them into the WinPE image.
One of the touted features of WinPE 2.1 is the ability to easily add drivers to it. See Microsoft's article on this called Walkthrough: Create a Windows RE Image. Step 4 addresses how to add mass storage device drivers. I found where Altiris installs the WAIK when I used the defaults. So now we have all the bits we need to put together a solution.
Wouldn't it be nice if there was a handy-dandy script that did all the work and all you had to do was point to where the driver files are? I thought so. So here's a vbscript that can be run on your deployment server to inject drivers into your winpe.wim file.
After your drivers are added, just recompile your PXE image or boot media and you should be good to go.
In the attached script (AddDriverWinPE.vbs), change the value of strDrivers in line 14 to point to the location of your drivers. Peimg.exe grabs the .inf files and puts them in WinPE.
This script can also create a back-up of winpe.wim just in case you need to roll back. To roll back, delete the newly created winpe.wim and rename the backup to winpe.wim.
By the way, adding vmxnet NIC drivers through the Altiris GUI caused WinPE to hang, but using this method did the trick.
Enjoy!
'==========================
' NAME: AddDriverWinPE.vbs
' AUTHOR: Frank Contreras
' DATE : 10/17/2008
'==========================
Option Explicit
Dim objFSO, objFile, objShell
Dim strWinpeFile, strWinpeMount, strImagexFile, strDrivers, strTools, strPEImg
Dim intYN, strQT
strQT = Chr(34)
strDrivers = "C:\3112Raid_x86_10600_logo\*.inf"
strTools = "C:\Program Files\Altiris\eXpress\Deployment Server\WAIK\Tools"
strWinpeFile = "\PETools\x86\winpe.wim"
strWinpeMount = "\PETools\x86\mount"
strPEImg = "\PETools\peimg.exe"
strImagexFile = "\x86\imagex.exe"
Set objFSO = CreateObject("Scripting.FileSystemObject")
Set objShell = CreateObject("WScript.Shell")
'Verify Wim File
If not objFSO.FileExists(strTools & strWinpeFile) Then
WScript.Echo "WinPE 2.1 does not appear to be installed."
WScript.Echo "Check the file path and look for the winpe.wim file."
WScript.Quit
End If
'Backup File
intYN = MsgBox ("Backup winpe.wim?", vbYesNo," ")
If intYN = 6 Then
WScript.Echo " Backing up winpe.wim to winpe.wim-"& Year(Now) & Month(Now) & Day(Now) & "-" & replace(replace(Time,":","-")," ","")
objFSO.CopyFile strTools & strWinpeFile, strTools & strWinpeFile & "-" & Year(Now) & Month(Now) & Day(Now) & "-" & replace(replace(Time,":","-")," ","")
End If
'Create WinPE mount directory
If Not objFSO.FolderExists(strTools & strWinpeMount) Then
WScript.Echo " Creating WinPE mount directory"
objFSO.CreateFolder(strTools & strWinpeMount)
End If
'Mount winpe image
WScript.Echo " Mounting winpe image.."
objShell.Run strQT & strTools & strImagexFile & strQT & " /mountrw " & strQT & strTools & strWinpeFile & strQT & " 1 " & strQT & strTools & strWinpeMount & strQT, 2, True
'Install Drivers
WScript.Echo " Installing drivers from " & strDrivers
objShell.Run strQT & strTools & strPEImg & strQT & " /inf=" & strQT & strDrivers & strQT & " /image=" & strQT & strTools & strWinpeMount & strQT, 2, True
'Unmount winpe image and commit changes
WScript.Echo " Committing changes and unmounting winpe image."
objShell.Run strQT & strTools & strImagexFile & strQT & " /unmount /commit " & strQT & strTools & strWinpeMount & strQT, 2, True
License: | AJSL By clicking the download link below, you agree to the terms and conditions in the Altiris Juice Software License |
Support: | User-contributed tools on the Juice are not supported by Altiris Technical Support. If you have questions about a tool, please communicate directly with the author by visiting their profile page and clicking the 'contact' tab. |