<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Frank's TechTips Blog</title>
	<atom:link href="http://www.frankcontreras.com/blog/?feed=rss2" rel="self" type="application/rss+xml" />
	<link>http://www.frankcontreras.com/blog</link>
	<description>Technical minutia that I find useful in my line of work.</description>
	<lastBuildDate>Sat, 31 Jan 2009 16:54:00 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Add Mass Storage Device Drivers (NICs too!) to WinPE 2.1</title>
		<link>http://www.frankcontreras.com/blog/?p=1</link>
		<comments>http://www.frankcontreras.com/blog/?p=1#comments</comments>
		<pubDate>Sat, 31 Jan 2009 15:40:08 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Altiris]]></category>

		<guid isPermaLink="false">http://www.frankcontreras.com/blog/?p=1</guid>
		<description><![CDATA[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 [...]]]></description>
			<content:encoded><![CDATA[<p>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.</p>
<p>One of the touted features of WinPE 2.1 is the ability to easily add drivers to it. See Microsoft&#8217;s article on this called <a href="http://technet.microsoft.com/en-us/library/cc749147.aspx">Walkthrough: Create a Windows RE Image</a>. 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.</p>
<p>Wouldn&#8217;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&#8217;s a vbscript that can be run on your deployment server to inject drivers into your winpe.wim file.</p>
<p>After your drivers are added, just recompile your PXE image or boot media and you should be good to go.</p>
<p>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.</p>
<p>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.</p>
<p>By the way, adding vmxnet NIC drivers through the Altiris GUI caused WinPE to hang, but using this method did the trick.</p>
<p>Enjoy!</p>
<table border="0" bgcolor="#c0c0c0">
<tbody>
<tr>
<td width="100%" align="left"><span style="font-family: courier new;">&#8216;==========================<br />
&#8216; NAME: AddDriverWinPE.vbs<br />
&#8216; AUTHOR: Frank Contreras<br />
&#8216; DATE : 10/17/2008<br />
&#8216;==========================<br />
Option Explicit</p>
<p>Dim objFSO, objFile, objShell<br />
Dim strWinpeFile, strWinpeMount, strImagexFile, strDrivers, strTools, strPEImg<br />
Dim intYN, strQT</p>
<p>strQT = Chr(34)<br />
strDrivers = &#8220;C:\3112Raid_x86_10600_logo\*.inf&#8221;<br />
strTools = &#8220;C:\Program Files\Altiris\eXpress\Deployment Server\WAIK\Tools&#8221;<br />
strWinpeFile = &#8220;\PETools\x86\winpe.wim&#8221;<br />
strWinpeMount = &#8220;\PETools\x86\mount&#8221;<br />
strPEImg = &#8220;\PETools\peimg.exe&#8221;<br />
strImagexFile = &#8220;\x86\imagex.exe&#8221;</p>
<p>Set objFSO = CreateObject(&#8220;Scripting.FileSystemObject&#8221;)<br />
Set objShell = CreateObject(&#8220;WScript.Shell&#8221;)</p>
<p>&#8216;Verify Wim File<br />
If not objFSO.FileExists(strTools &amp; strWinpeFile) Then<br />
WScript.Echo &#8220;WinPE 2.1 does not appear to be installed.&#8221;<br />
WScript.Echo &#8220;Check the file path and look for the winpe.wim file.&#8221;<br />
WScript.Quit<br />
End If</p>
<p>&#8216;Backup File<br />
intYN = MsgBox (&#8220;Backup winpe.wim?&#8221;, vbYesNo,&#8221; &#8220;)<br />
If intYN = 6 Then<br />
WScript.Echo &#8221; Backing up winpe.wim to winpe.wim-&#8221;&amp; Year(Now) &amp; Month(Now) &amp; Day(Now) &amp; &#8220;-&#8221; &amp; replace(replace(Time,&#8221;:&#8221;,&#8221;-&#8221;),&#8221; &#8220;,&#8221;")<br />
objFSO.CopyFile strTools &amp; strWinpeFile, strTools &amp; strWinpeFile &amp; &#8220;-&#8221; &amp; Year(Now) &amp; Month(Now) &amp; Day(Now) &amp; &#8220;-&#8221; &amp; replace(replace(Time,&#8221;:&#8221;,&#8221;-&#8221;),&#8221; &#8220;,&#8221;")<br />
End If</p>
<p>&#8216;Create WinPE mount directory<br />
If Not objFSO.FolderExists(strTools &amp; strWinpeMount) Then<br />
WScript.Echo &#8221; Creating WinPE mount directory&#8221;<br />
objFSO.CreateFolder(strTools &amp; strWinpeMount)<br />
End If</p>
<p>&#8216;Mount winpe image<br />
WScript.Echo &#8221; Mounting winpe image..&#8221;<br />
objShell.Run strQT &amp; strTools &amp; strImagexFile &amp; strQT &amp; &#8221; /mountrw &#8221; &amp; strQT &amp; strTools &amp; strWinpeFile &amp; strQT &amp; &#8221; 1 &#8221; &amp; strQT &amp; strTools &amp; strWinpeMount &amp; strQT, 2, True</p>
<p>&#8216;Install Drivers<br />
WScript.Echo &#8221; Installing drivers from &#8221; &amp; strDrivers<br />
objShell.Run strQT &amp; strTools &amp; strPEImg &amp; strQT &amp; &#8221; /inf=&#8221; &amp; strQT &amp; strDrivers &amp; strQT &amp; &#8221; /image=&#8221; &amp; strQT &amp; strTools &amp; strWinpeMount &amp; strQT, 2, True</p>
<p>&#8216;Unmount winpe image and commit changes<br />
WScript.Echo &#8221; Committing changes and unmounting winpe image.&#8221;<br />
objShell.Run strQT &amp; strTools &amp; strImagexFile &amp; strQT &amp; &#8221; /unmount /commit &#8221; &amp; strQT &amp; strTools &amp; strWinpeMount &amp; strQT, 2, True</p>
<p></span></td>
</tr>
</tbody>
</table>
<p>This was originally published on juice.altiris.com on October, 21, 2008.   The vbscript can be downloaded from Symantec (formerly Altiris).<br />
<a href="http://www.symantec.com/community/article/5983/add-mass-storage-device-drivers-nics-too-winpe-21">http://www.symantec.com/community/article/5983/add-mass-storage-device-drivers-nics-too-winpe-21</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.frankcontreras.com/blog/?feed=rss2&amp;p=1</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
