Injecting NIC Drivers into a WDS Boot Image

We’re switching to a new laptop here at the office, and this new laptop uses a NIC driver that is not included in Server 2008 Standard’s boot.wim.  Naturally, instead of rebuilding the entire WIM (and reinventing the wheel), I decided it would be best to inject the new driver(s).

The link:  http://support.microsoft.com/kb/923834/en-us.

Now, the problem description isn’t exactly the issue we were experiencing, so the part that applied to us:

3. Update the WDS boot image to include the new third-party network driver. To do this, follow these steps.

Note The following procedure assumes that the Windows Automated Installation Kit (AIK) is installed on the WDS server. If the Windows AIK is not installed on the WDS server, you can perform the same procedure on another computer that does have the Windows AIK installed. Then, map a network drive to the WDS server.

a. On the WDS server, click Start, click Run, type wdsmgmt.msc, and then press OK.
b. Under your WDS server, double-click Boot images.
c. Right-click the boot image that you want, and then click Disable.
d. Right-click the same boot image, click Properties, and then click General.
e. Note the name and location of the boot image that is displayed in the File name box.
f. At a command prompt, type the following:

C:\Program Files\Windows\aiktools\petools\copype.cmd x86 c:\windowspe-x86
Note Keep this command prompt window open for the next step.
Imagex /info Drive:\remoteinstall\bootx86\images\boot.wim

Notes
• Drive:\remoteinstall represents the path at which the Remoteinstall folder is installed.
• Boot.wim is the name of the boot image.

g. Note the boot index number of the bootable image that is displayed. To identify the boot index number, locate the line that contains “boot index: X.”

Note X is the boot index number. The number indicates that image number X is marked as bootable and that the image is to be updated. The second image is the default image that you would typically modify. However, always verify which image is marked as bootable.

h. At a command prompt, type the following:

Imagex /mountrw Drive:\remoteinstall\bootx86\images\boot.wim 2 mount
peimg /inf=driver.inf mount\Windows
imagex /unmount /commit mount

Notes
• Drive:\remoteinstall represents the path at which the Remoteinstall folder is installed.
• Driver.inf is the name of the third-party driver.
• The Imagex /mountrw command mounts the specified image, with read/write permissions, to the specified directory.

4. Enable the boot image on the WDS server. To do this, follow these steps:
a. On the WDS server, click Start, click Run, type wdsmgmt.msc, and then click OK.
b. Under WDS server, double-click Boot images.
c. Right-click the boot image that you want, and then click Enable.

It would be useful the note at this point that we use Server 2008 Standard x64 (not x86) and these steps worked just fine.

Lock Your Computer

We are all professionals here – well, most of us.  We all know that one should lock his or her computer before leaving their desk.  Blah, blah.

The keyboard I use at work has programmable keys – I can make them do all sorts of things, like run a batch file.  So, I was looking for a way to lock my computer via one of the larger buttons on my keyboard (sometimes I forget, so I’ll come back and instead of walking around my desk, I’ll try to do it over the top of the monitors).  I know that you can press the Windows Logo+L, Ctrl+Alt+Del and Enter, and a number of other assorted keystrokes, but a large button seems to be the ticket.  So, without further babbling, I’ll share the command to put into your batch file:

rundll32.exe user32.dll, LockWorkStation

That’s it.  Pretty cool if you ask me.  Now I’ll I need is a huge, red USB PANIC button to slap when I get up from my desk.  That would be awesome.

winsxs: The Bain of My Current Existance

Long time no see.

I was digging through one of our virtual terminal servers today to try and figure out why there was only 29.8MB of 20GB free on the system partition.  A large culprit turned out to be the C:\Windows\winsxs folder.  Unfortunately, there doesn’t seem to be a lot that can be done about this 6GB+ folder full of, well, crap.

From MSDN:

Administrators should not, for any reason, take it upon themselves to clean out the directory – doing so may prevent Windows Update and MSI from functioning properly afterwards.

But, alas, this is just another day in the life.  I’m bleeding from my eyeballs.  We’re still looking for a fix, workaround, way to move it, or a way to delete it, but I don’t have much confidence that that approach.

Really, Microsoft?  Really?

Run as…

Mark Russinovich from Microsoft developed a tool as part of Sysinternals to give you the “Run as…” option when you right click a program in Vista. Without this tool, Vista will allow you to run as Administrator, which is totally useless when you’re trying to access a domain resource.

Once you unzip “shellrunas.exe” (put it somewhere in your PATH) you will need to run “shellrunas /reg” at a command prompt. Once it tells you it has been registered, you will see “Run as different user…” in your right click menu.

The link: http://technet.microsoft.com/en-us/sysinternals/cc300361.aspx