Microsoft Deployment Toolkit Team Blog

Official blog for the MDT engineering team

Workarounds for two bugs in Microsoft Deployment

Workarounds for two bugs in Microsoft Deployment

  • Comments 3
  • Likes

One thing that amazes me about this community is the number of early adopters and the incredible amount of feedback that we receive on our products.  We thank you very much for testing, implementing, and providing your feedback.  We released Microsoft Deployment almost two weeks ago and we have already seen two relatively minor bugs surface through the public newsgroups.  The following information describes these two bugs and how you can overcome them in your environment.

ZTITatoo.wsf

For those of you who may not know what ztitatoo does, this script adds entries into WMI on the client machine in order to track version information of your deployments so you can run WMI queries or SMS Reports to see some or all of the following properties:

  • Deployment Method
  • Deployment Type
  • Deployment Timestamp
  • Task Sequence ID
  • Task Sequence Name
  • Task Sequence Version
  • OSD Package ID
  • OSD Program Name
  • OSD Advertisement ID

Unfortunately the ztitatoo.wsf script was not fully updated to match our new name so there are some bugs inside of the script that point to registry entries that were used with BDD 2007.

To work around this bug, go to c:\program files\Microsoft Deployment Toolkit\templates\Distribution\scripts folder and edit the ztitatoo.wsf file.  After saving the file in your templates folder make sure you copy the updated ztitattoo.wsf file to your distribution$\scripts directory.

Replace the following lines:

'//----------------------------------------------------------------------------
'//  Record the deployment details
'//----------------------------------------------------------------------------

oShell.RegWrite "HKEY_LOCAL_MACHINE\Software\Microsoft\BDD 2007\Deployment Method", oEnvironment.Item("DeploymentMethod"), "REG_SZ"
oShell.RegWrite "HKEY_LOCAL_MACHINE\Software\Microsoft\BDD 2007\Deployment Type", oEnvironment.Item("DeploymentType"), "REG_SZ"

Set oDate = CreateObject("WbemScripting.SWbemDateTime")
oDate.SetVarDate(Now())
oShell.RegWrite "HKEY_LOCAL_MACHINE\Software\Microsoft\BDD 2007\Deployment Timestamp", oDate.Value, "REG_SZ"

'//----------------------------------------------------------------------------
'//  If this is Lite Touch, populate the task sequence details
'//----------------------------------------------------------------------------

oShell.RegWrite "HKEY_LOCAL_MACHINE\Software\Microsoft\BDD 2007\Task Sequence ID", oEnvironment.Item("TaskSequenceID"), "REG_SZ"
oShell.RegWrite "HKEY_LOCAL_MACHINE\Software\Microsoft\BDD 2007\Task Sequence Name", oEnvironment.Item("TaskSequenceName"), "REG_SZ"
oShell.RegWrite "HKEY_LOCAL_MACHINE\Software\Microsoft\BDD 2007\Task Sequence Version", oEnvironment.Item("TaskSequenceVersion"), "REG_SZ"

'//----------------------------------------------------------------------------
'//  If this is OSD, populate the package ID and program name
'//----------------------------------------------------------------------------

If oEnvironment.Item("OSDPACKAGEID") <> "" then

    sValue = oEnvironment.Item("OSDSITECODE") & ":" & oEnvironment.Item("OSDPACKAGEID")   
    oShell.RegWrite "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\CM_DSLID", sValue, "REG_SZ"

    oShell.RegWrite "HKEY_LOCAL_MACHINE\Software\Microsoft\BDD 2007\OSD Package ID", oEnvironment.Item("OSDPACKAGEID")
    oShell.RegWrite "HKEY_LOCAL_MACHINE\Software\Microsoft\BDD 2007\OSD Program Name", oEnvironment.Item("OSDPROGRAMID")
    oShell.RegWrite "HKEY_LOCAL_MACHINE\Software\Microsoft\BDD 2007\OSD Advertisement ID", oEnvironment.Item("OSDADVERTID")

End if

Replace with this code:

'//----------------------------------------------------------------------------
'//  Record the deployment details
'//----------------------------------------------------------------------------

oShell.RegWrite "HKEY_LOCAL_MACHINE\Software\Microsoft\Deployment 4\Deployment Method", oEnvironment.Item("DeploymentMethod"), "REG_SZ"
oShell.RegWrite "HKEY_LOCAL_MACHINE\Software\Microsoft\Deployment 4\Deployment Type", oEnvironment.Item("DeploymentType"), "REG_SZ"

Set oDate = CreateObject("WbemScripting.SWbemDateTime")
oDate.SetVarDate(Now())
oShell.RegWrite "HKEY_LOCAL_MACHINE\Software\Microsoft\Deployment 4\Deployment Timestamp", oDate.Value, "REG_SZ"

'//----------------------------------------------------------------------------
'//  If this is Lite Touch, populate the task sequence details
'//----------------------------------------------------------------------------

oShell.RegWrite "HKEY_LOCAL_MACHINE\Software\Microsoft\Deployment 4\Task Sequence ID", oEnvironment.Item("TaskSequenceID"), "REG_SZ"
oShell.RegWrite "HKEY_LOCAL_MACHINE\Software\Microsoft\Deployment 4\Task Sequence Name", oEnvironment.Item("TaskSequenceName"), "REG_SZ"
oShell.RegWrite "HKEY_LOCAL_MACHINE\Software\Microsoft\Deployment 4\Task Sequence Version", oEnvironment.Item("TaskSequenceVersion"), "REG_SZ"

'//----------------------------------------------------------------------------
'//  If this is OSD, populate the package ID and program name
'//----------------------------------------------------------------------------

If oEnvironment.Item("OSDPACKAGEID") <> "" then

    sValue = oEnvironment.Item("OSDSITECODE") & ":" & oEnvironment.Item("OSDPACKAGEID")   
    oShell.RegWrite "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\CM_DSLID", sValue, "REG_SZ"

    oShell.RegWrite "HKEY_LOCAL_MACHINE\Software\Microsoft\Deployment 4\OSD Package ID", oEnvironment.Item("OSDPACKAGEID")
    oShell.RegWrite "HKEY_LOCAL_MACHINE\Software\Microsoft\Deployment 4\OSD Program Name", oEnvironment.Item("OSDPROGRAMID")
    oShell.RegWrite "HKEY_LOCAL_MACHINE\Software\Microsoft\Deployment 4\OSD Advertisement ID", oEnvironment.Item("OSDADVERTID")

End if

Set Diskpart Bios Compatibility Mode Task

You might have noticed that we have included a task item in our templates for Standard Client and Standard Server Lite Touch Task sequences called Set Diskpart BIOS Compatibility Mode.  This task is designed to fix the Windows PE Uberbug that is described in the following KB articles:

http://support.microsoft.com/?id=931760
http://support.microsoft.com/?id=931761

This task is disabled by default.  If you have enabled the task you have probably noticed that the task sequence fails and examining the smsts.log file shows that an "Access is denied" error occurred when running the ztisetvariable.wsf script.  The actual error message is really Incorrect Function but that does not help you solve the problem.

The problem or bug is actually within the client.xml and server.xml files that serve as templates for our Standard Client and Standard Server task sequences.

Inside of the client and server.xml files in c:\program files\Microsoft
Deployment Toolkit\templates folder, modify the following section:

Change this:
      <step type="SMS_TaskSequence_SetVariableAction" name="Set Diskpart
BIOS Compatibility Mode" description="" disable="true"
runIn="WinPEandFullOS" successCodeList="0">
        <action>cscript.exe "%SCRIPTROOT%\ZTISetVariable.wsf"</action>
        <defaultVarList>
           <variable name="VariableName" property="VariableName"
hidden="true">OSDDiskpartBiosCompatibilityMode</variable>
           <variable name="VariableValue" property="VariableValue"
hidden="true">TRUE</variable>
         </defaultVarList>
      </step>

To this:
      <step type="SMS_TaskSequence_SetVariableAction" name="Set Diskpart
BIOS Compatibility Mode" description="" disable="true"
runIn="WinPEandFullOS" successCodeList="0">
        <action>cscript.exe "%SCRIPTROOT%\ZTISetVariable.wsf"</action>
        <defaultVarList>
           <variable name="VariableName"
property="VariableName">OSDDiskpartBiosCompatibilityMode</variable>
           <variable name="VariableValue"
property="VariableValue">TRUE</variable>
         </defaultVarList>
      </step>

Essentially you are just removing the hidden="true" from the XML file.  Once
you save the XML files just delete your task sequence from the workbench and recreate it.

Again thank you very much for finding these issues and please keep the feedback coming!

Comments
  • One thing that amazes me about this community is the number of early adopters and the incredible amount

  • I've been doing more BDD/Microsoft Deployment work lately with various DDPS engagements and there are two fairly well known bugs in the current Microsoft Deployment toolkit that are easily fixed, but becomes tedious to fix on every install. Rather th

  • Source: Aaron Tiensivu&#39;s Blog I&#39;ve been doing more BDD/ Microsoft Deployment work lately with

Your comment has been posted.   Close
Thank you, your comment requires moderation so it may take a while to appear.   Close
Leave a Comment