The SCCM 2007 Operating System Deployment components use the Windows Automated Installation Toolkit (WAIK) for creating, managing, and deploying Windows Imaging (WIM) images.  SCCM 2007 setup installs the Windows Vista RTM WAIK (WAIK 1.0) during installation if it is not already installed.  In order to deploy Windows Vista SP1 and Windows Server 2008 with SCCM 2007, the WAIK must be updated to the latest version (WAIK 1.1)    This process is documented in this Microsoft Knowledge Base article: http://support.microsoft.com/?id=950782.  (SCCM 2007 Service Pack 1 will natively support these operating systems when it becomes available.)

The first two steps in this process are very straight forward: uninstall WAIK 1.0, then install WAIK 1.1.  The second two steps document a method of creating new WinPE 1.1 Boot Images and importing them into SCCM.  The WinPE Boot Images need to be version 1.1 to support deploying Windows Vista SP1 and Windows Server 2008.  If you are using the latest version of the Microsoft Deployment Toolkit 2008 with SCCM 2007 integration enabled (v4.1 released in March is the latest), you can use the menu option that MDT adds to the SCCM Boot Images node for creating new boot images and avoid step 3.

However, if you are not using MDT and want to create new default SCCM boot images, the method documented in step 3 of KB 950782 is likely to give you about as much pleasure as a root canal.  This method uses WBEMTest, a tool for testing WMI that is built into the OS.  If you've used WBEMTest before, the experience is usually something you don't want to repeat.  While it is very flexible for testing many WMI options, it is very tedious to use to execute a simple WMI method (as is needed to create new default SCCM boot images).  So to alleviate this pain, I used the WMI Code Creator and the SCCM SDK to create a VBScript that turns the long mouse click tedium of WBEMTest into a few second operation.

To use this script, log on to the SCCM site server as an SCCM administrator.  Create a folder that will hold the new boot images.  If you are going to import the boot images from this folder, you may want to create it in the location when you keep your package source folders.  (The folder from which the WinPE WIM file is imported becomes the boot image package data source.)  Copy the ExportDefaultBootImages.vbs (listed below) to a folder on the server and edit the strExportFolder variable to point to the folder you just created.  Then run then script from a command prompt with cscript.exe.  When the script is finished you will have two sub folders, one containing an x86 boot image and one containing an x64 boot image.  You can then either import the images as documented in step 4 of KB 950782 from these folders or move them to another location and import from there.

ExportDefaultBootImages.vbs


' Windows Script Host Sample Script
' ------------------------------------------------------------------------
' Copyright (C) 2008
'
' You have a royalty-free right to use, modify, reproduce and distribute
' the Sample Application Files (and/or any modified version) in any way
' you find useful, provided that you agree that Microsoft and the author
' have no warranty, obligations or liability for any Sample Application
' Files.
' ------------------------------------------------------------------------

'This script replaces the procedure in step 3
'of this Microsoft Knowledge Base article:
'http://support.microsoft.com/?kbid=950782

strExportFolder =  "E:\BootImages"

Set objFSO = CreateObject("Scripting.FileSystemObject")

'Export x86 boot image
strx86Folder = strExportFolder & "\Default_WAIK_1_1_x86"
If Not objFSO.FolderExists(strx86Folder) Then objFSO.CreateFolder(strx86Folder)
ExportBootImage "x86", strx86Folder & "\WAIK_1_1_boot_image_x86.wim", 1

'Export x64 boot image
strx64Folder = strExportFolder & "\Default_WAIK_1_1_x64"
If Not objFSO.FolderExists(strx64Folder) Then objFSO.CreateFolder(strx64Folder)
ExportBootImage "x64", strx64Folder & "\WAIK_1_1_boot_image_x64.wim", 1


Function GetSiteCode

    GetSiteCode = ""

    strComputer = "."
    Set objWmiSmsNamespace = GetObject("winmgmts:\\" & strComputer & "\root\SMS")
    Set objSmsProviderLoc = objWmiSmsNamespace.InstancesOf("SMS_ProviderLocation")

    For Each location In objSmsProviderLoc
        If location.ProviderForLocalSite = True Then
                GetSiteCode = location.SiteCode
        End If
    Next

End Function


Sub ExportBootImage(strArchitecture, strExportImagePath, intImageIndex)

    strComputer = "."
    Set objWmiSmsSiteNamespace = GetObject("winmgmts:\\" & strComputer & "\root\SMS\site_" & GetSiteCode)

    ' Obtain an instance of the the class
    Set objShare = objWmiSmsSiteNamespace.Get("SMS_BootImagePackage")

    ' Obtain an InParameters object specific
    ' to the method.
    Set objInParam = objShare.Methods_("ExportDefaultBootImage").inParameters.SpawnInstance_()

    ' Add the input parameters.
    objInParam.Properties_.Item("Architecture") =  strArchitecture
    objInParam.Properties_.Item("ExportImagePath") =  strExportImagePath
    objInParam.Properties_.Item("ImageIndex") =  intImageIndex

    ' Execute the method and obtain the return status.
    ' The OutParameters object in objOutParams
    ' is created by the provider.
    Set objOutParams = objWmiSmsSiteNamespace.ExecMethod("SMS_BootImagePackage", "ExportDefaultBootImage", objInParam)

    ' List OutParams
    Wscript.Echo "Out Parameters for " & strArchitecture & " boot image : "
    Wscript.echo "ReturnValue: " & objOutParams.ReturnValue

End Sub

References

How to replace Windows AIK version 1.0 with Windows AIK version 1.1 when you use System Center Configuration Manager 2007
http://support.microsoft.com/?id=950782

Automated Installation Kit (AIK) for Windows Vista SP1 and Windows Server 2008  (WAIK 1.1)
http://www.microsoft.com/downloads/details.aspx?familyid=94BB6E34-D890-4932-81A5-5B50C657DE08&displaylang=en

TechNet Magazine Utility Spotlight: WMI Code Creator
http://technet.microsoft.com/en-us/magazine/cc161034.aspx

System Center Configuration Manager 2007 Software Development Kit (SDK) v4.0
http://www.microsoft.com/downloads/details.aspx?FamilyId=064A995F-EF13-4200-81AD-E3AF6218EDCC&displaylang=en

Disclaimer: The information on this site is provided "AS IS" with no warranties, confers no rights, and is not supported by the authors or Microsoft Corporation. Use of included script samples are subject to the terms specified in the Terms of Use.

This post was contributed by Michael Murgolo a Senior Consultant with Microsoft Services, U.S. East Region.