MS Deployment

MDT 2008, VMWare Workstation and Stop 0x7B

When working with the Microsoft Deployment Toolkit (MDT) I spend a lot of time in VMWare Workstation as it makes the job of developing and testing a workstation image much simpler. However there is one big gottcha that you should be aware of. Make sure you edit your .VMX file and modify the following:

scsi0.present = “TRUE” should be changed to scsi0.present = “FALSE”

If you don’t do this then after deploying a Syspreped image to VMWare Workstation you’ll end up with a Stop 0x7B error and much less hair than when you started.

Thanks Chris for reminding me of something I supposedly knew. :)

Read more

(Windows SIM) cannot create catalog files for some images of a different architecture

Today I was attempting to create a sysprep.xml file for Windows 2008. After opening my WIM file in Windows SIM I got the prompt to generate a Catalog file, clicked Yes and then……Error!! What?? Lets try that again….Error!! Whatever, lets try again, Error!! Ok this time I read the error. “System.Reflection.TargetParameterCountException: Parameter count mismatch.” Ummm, what??

After wasting almost 2 hours chasing this error I found this post on the TechNet Forums:

The key information is:

Because of the changes in the servicing stack in Windows Vista with Service Pack 1 (SP1) and Windows Server 2008, Windows System Image Manager (Windows SIM) cannot create catalog files for some Windows images of different architecture types. The following list describes the Image Manager architecture types and catalogs that can be created for each one.

x86 Windows SIM:
Can create catalogs for x86, x64, and Itanium-based Windows images.

x64 Windows SIM:
Can create catalogs only for x64 Windows images.

Itanium-based Windows SIM:
Can create catalogs only for Itanium-based Windows images. 

Please confirm if what version of Windows SIM you are using. I recommend installing x86 Windows SIM.

Hope it helps.

Tim Quan – MSFT

Update: Michael Niehaus pointed out that this information is available in the updated version of the WAIK 1.1 release notes available at

Read more

MDT 2008 Source Code

I’m not sure how I missed this one or how long it has been available but you can download the source code for MDT 2008 from Microsoft Download. You can learn a lot about how MDT 2008 works and also a lot about managed MMC snap-ins from the MDT 2008 source code. Click here to download.

Read more

Moving to a single partition in MDT 2008 refresh scenario

I spotted an article on Micheal Niehaus’ blog the other day about moving to a single partition when doing OS deployments. You can read the article here.

This very issue arose in the project I am currently involved in and after trying reading and implementing Micheal’s post I found a couple of nuances:

    • If there is an OEM partition (like WinRE) then you risk deleting you’re OS partition. OEM partitions are often a hidden partition (Type 0×27) at the start of the disk that allow OEM’s to offer a recovery environment for their customers.
  • If there is more than a one extra partition on the disk then ExtendOemPartition=1 won’t really work.

I thought the problem deserved some more attention so I’ve written a script to be included in the “Refresh only” section of “Preinstall” in the Task Sequence that you use to deploy you’re image. The script queries WMI to find how many partition are on the disk that contains C:. If there are any partitions after the C: partition they are removed using diskpart “delete partition”.

Any comments or suggestions please let me know!


Read more

MDT 2008 and Powershell: Creating a distribution directory

I’ve been playing with automating MDT 2008 using Powershell and thought I’d start to share some of the info over the next few weeks.

The very first thing you need to do in MDT is create a Distribution Share. It turns out this is exceptionally easy in Powershell. The Microsoft.BDD.ConfigManager.Manager namespace has a method called UpgradeDistributionShare(string location, bool update). Just pass in the location you’d like to create the distribution share at and you’re done! You can set update to true if you are upgrading an existing Distribution Share to MDT 2008.

Here is the code:

[string]$Location=$(throw"You must specify a Location")
#Initialize MDT
[System.Reflection.Assembly]::LoadFile("C:\Program Files\Microsoft Deployment Toolkit\Bin\Microsoft.BDD.ConfigManager.dll") | Out-Null
$manager= [Microsoft.BDD.ConfigManager.Manager]
#Create a new MDT Distribution Share
$manager::UpgradeDistributionShare($Location, $false)
Read more

Unattended Installation for the .NET Framework 3.5

There seems to be a bit of confusion around the place about installing the .NET Framework 3.5 and it’s prerequisites. Firstly I’ll say that the .NET Framework 3.5 standalone redistributable package available from the Microsoft Download Center contains all the prerequisites for .NET 3.5 except the Windows Installer 3.1 Redistributable. Yes it’s true, everything you need is in the one file: dotnetfx35.exe.

Secondly there is some great information on deploying the .NET Framework 3.5 on MSDN at

You will see from the article above you can silently install the .NET Framework 3.5 but running the following command:

  • dotnetfx35.exe /q /norestart

Wow! Couldn’t be easier! However what if you’re in an environment where everything is installed via MSIs and undergoes a certain degree of package standardization before deployment??? I found myself in this situation and as it turns out there is a lot of information available on this as well. Aaron Stebner has a wealth of information on installing the .NET Framework. In particular:

There is also a batch script at the bottom of for creating the Administrator installation points. I had a few problems with the script on MSDN so I used my own version which is included below. Download dotnetfx35.exe from Microsoft Downloads and place it in a temp folder somewhere under a directory called 3.5. I used C:\netFramework\3.5 as my location. Then copy the batch file below into a file called Create35AdminInstall.cmd under C:\netFramework. Double-Click the Batch file and you’re away!! When the script is finished you will end up with admin install points for:

  • MSXML Parser 6 – msiexec /i netfx35_deploy\AdminInstallPoint\MSXML6_x86\msxml6.msi /qb-
  • RGB Rasterizer – msiexec /i netfx35_deploy\AdminInstallPoint\RGBRAST_x86\RGB9RAST_x86.msi /qb-
  • .NET Framework 2.0 SP1 – msiexec /i netfx35_deploy\AdminInstallPoint\NETFX20_x86\netfx20a_x86.msi /qb VSEXTUI=1
  • .NET Framework 3.0 SP1 – msiexec /i netfx35_deploy\AdminInstallPoint\NETFX30_x86\netfx30a_x86.msi /qb VSEXTUI=1
  • .NET Framework 3.5 – msiexec /i netfx35_deploy\AdminInstallPoint\netfx35_x86\vs_setup.msi  /qb VSEXTUI=1


@Echo Off
set WORKFOLDER=%~dp0netfx35_deploy
set dotNetFX35build=%WORKFOLDER%\dotnetfx35.exe
echo Creating Admin Install points for NETFX3 %PROCESSOR_ARCHITECTURE%

REM Create folders where work will be done
md “%WORKFOLDER%\extracted”
md “%WORKFOLDER%\AdminInstallPoint”
md “%WORKFOLDER%\logs”

REM Extract the files from the NETFX35 redist SFX
Echo Extract the files from the NETFX35 redist SFX
call “%~dp03.5\dotnetfx35.exe” /q /x:”%WORKFOLDER%\extracted”

REM ————————————————————
REM create the MSXML6 x86 admin install point
Echo Create the MSXML6 x86 admin install point
md “%WORKFOLDER%\AdminInstallPoint\MSXML6_x86”
call msiexec /a “%WORKFOLDER%\extracted\wcu\dotNetFramework\dotNetFX30\x86\msxml6.msi” /qb /l*v “%WORKFOLDER%\logs\MSXML6_x86.log” Targetdir=”%WORKFOLDER%\AdminInstallPoint\MSXML6_x86″

REM ————————————————————
REM create the RGBRAST x86 admin install point
Echo Create the RGBRAST x86 admin install point
md “%WORKFOLDER%\AdminInstallPoint\RGBRAST_x86”
call msiexec /a “%WORKFOLDER%\extracted\wcu\dotNetFramework\dotNetFX30\RGB9RAST_x86.msi” /qb /l*v “%WORKFOLDER%\logs\RGBRAST_x86.log” REBOOT=ReallySuppress Targetdir=”%WORKFOLDER%\AdminInstallPoint\RGBRAST_x86″

REM ————————————————————
REM Extract NETFX 35 x86 components
Echo Extract NETFX 35 x86 components
md “%WORKFOLDER%\extracted\netfx35_x86”
call “%WORKFOLDER%\extracted\wcu\dotNetFramework\dotNetFX35\x86\netfx35_x86.exe” /q /x: “%WORKFOLDER%\extracted\netfx35_x86”

REM ————————————————————
REM create the NETFX35 x86 admin install point
Echo Create the NETFX35 x86 admin install point
md “%WORKFOLDER%\AdminInstallPoint\netfx35_x86”
call msiexec /qb /a “%WORKFOLDER%\extracted\netfx35_x86\vs_setup.msi” USING_EXUIH=1 REBOOT=ReallySuppress /l*v “%WORKFOLDER%\logs\netfx35_x86.log” TARGETDIR=”%WORKFOLDER%\AdminInstallPoint\netfx35_x86″

REM ————————————————————
REM create the NETFX20 x86 SP1 admin install point
Echo Create the NETFX20 x86 SP1 admin install point

REM 2.0 SP1 files location
Set fx20=%WORKFOLDER%\extracted\wcu\dotNetFramework\dotNetFX20\
md “%WORKFOLDER%\AdminInstallPoint\NETFX20_x86”
call msiexec /a “%fx20%netfx20a_x86.msi” TARGETDIR=”%WORKFOLDER%\AdminInstallPoint\NETFX20_x86″
call msiexec /a “%WORKFOLDER%\AdminInstallPoint\NETFX20_x86\netfx20a_x86.msi” PATCH=”%fx20%ASPNET.msp;%fx20%CLR.msp;%fx20%CRT.msp;%fx20%NetFX_CA.msp;%fx20%NetFX_Core.msp;%fx20%NetFX_Other.msp;%fx20%PreXP.msp;%fx20%WinForms.msp;%fx20%DW.msp” USING_EXUIH=1 REBOOT=ReallySuppress /l*v “%WORKFOLDER%\logs\netfx20_x86.log”

REM msiexec.exe /i c:\netfx20sp1\x86\AIP\netfx20a_x86.msi /l*v %temp%\netfx20sp1x86log.txt /qb VSEXTUI=1

REM ————————————————————
REM create the NETFX30 SP1 x86 admin install point
Echo Create the NETFX30 x86 SP1 admin install point

REM 3.0 SP1 files location
Set fx30=%WORKFOLDER%\extracted\wcu\dotNetFramework\dotNetFX30\
md “%WORKFOLDER%\AdminInstallPoint\NETFX30_x86”
call msiexec /a “%fx30%netfx30a_x86.msi” TARGETDIR=”%WORKFOLDER%\AdminInstallPoint\NETFX30_x86″
call msiexec /a “%WORKFOLDER%\AdminInstallPoint\NETFX30_x86\netfx30a_x86.msi” PATCH=”%fx30%WCF.msp;%fx30%WCS.msp;%fx30%WF.msp;%fx30%WPF1.msp;%fx30%WPF2.msp;%fx30%WPF_Other.msp;%fx30%XPS.msp;%fx30%WF_32.msp;%fx30%WPF2_32.msp;%fx30%WPF_Other_32.msp” USING_EXUIH=1 REBOOT=ReallySuppress /l*v “%WORKFOLDER%\logs\netfx30_x86.log”


The batch file can be download (1.87 KB)

Read more

GImageX (ImageX GUI)

Head on over to Richard Smith’s blog to get GImageX. GImageX is a GUI for imageX. The original verison was written in AutoIT but this version has been completely rewritten in C++. The new version v2.0.1 BETA feature list on Richard’s site:

  • Native x86 and x64 versions entirely written in C++.  Tiny ~100KB executable.
  • Doesn’t use the imagex.exe utility at all – instead it uses the WIMGAPI interface (the wimgapi.dll file from the imagex directory)
  • Progress bars, time elapsed, time remaining, file counts have been added
  • Clean “abort” option
  • Ability to mount, change and get info on WIM images

So what are you waiting for, click here to get it.

Read more