Translate this site using Windows Live Translator:
Welcome to TechNet Blogs Sign in | Join | Help

How to customize the MDT database and... the Workbench

New post for a while, April was quite busy supporting customers... Among several posts I have in draft, this one is quite interesting (from my point of view !) and I wrote it down as soon as I was able to make it works... before I leave for 2 weeks off.

Well, I did not see many people having a customized MDT database that can be provisioned through the Workbench... That's touchy in essence and weird... but we can do it.

As the source code of Microsoft Deployment 2008 has now been publicly released, some of you may want to customize far further the database and provide additional personalization during deployment. This should be possible by using the following step by step.

My first concern was the ability to define static IP addresses when I'm deploying servers. Except by using the Task Sequence and use the predefined task Apply Network Settings (you have to provision with static configuration and not dynamic one), there's no way to do that natively.

My goal was to add the IP Address, the Default Gateway and the Subnet Mask in the database and be able to provision them through the Workbench. Thus I would like to retrieve this information during the deployment and use them to configuration my target machine with...

And last... excuse me if I use some words that do not correspond to the development syntax... I'm not a developer, and I can confirm as one of my teammates helped me a lot around .NET compilation (this guy is really huge !).

Requirements

The requirements are :

You also need to have MDT 2008 installed somewhere...

In Visual Studio 2005

Project signature

As some of the components of the MDT will be rebuild, on some systems the signature of DLL or snapins must be signed. We don't have the original key so we'll create our.

  1. Create a “Keys” folder in the installation folder (e.g. “C:\Program Files\Microsoft Deployment Toolkit 2008 Source\Keys”).
  2. Using a “Visual Studio 2005 Command Prompt”, navigate to the created directory and execute the command “sn.exe -k Microsoft.BDD.snk”. This will create the strong named key needed for compiling the managed code assembly projects.

image

 Test compilation

  1. Open Visual Studio 2005
  2. Open the project Workbench ("C:\Program Files\Microsoft Deployment Toolkit 2008 Source\Workbench\Microsoft.BDD.Workbench.sln")
  3. It should open the Workbench project as well as all dependencies :

    image
  4. From the Build menu, select Rebuild Solution
  5. If there are some errors related to references in the project, look at missing or incorrect references and replace them with the correct DLLs
  6. It should rebuild all DLLs in the folder ..\..\..\..\Program Files\Microsoft Configuration Manager Console\AdminUI\bin\

Add customization

  1. In the project Workbench, open the code for DatabaseDetails.cs and add the following code at the end, after the section SkipBitLockerDetails :

    [Category("Wizard Control"), Description("Skip the BitLocker details pane")]
    public String SkipBitLockerDetails
    {
      get
      {
        return theRow["SkipBitLockerDetails"].ToString();
      }
      set
      {
        theRow["SkipBitLockerDetails"] = value;
      }
    }

    /// <summary>
    /// Custom data
    /// </summary>

    [Category("TCP/IP Configuration"), Description("TC/IP Address #1")]
    public String OSDAdapter0IPAddressList
    {
      get
      {
        return theRow["OSDAdapter0IPAddressList"].ToString();
      }
      set
      {
        theRow["OSDAdapter0IPAddressList"] = value;
      }
    }

    You can add all the custom data you want like described for the OSDAdapter0IPAddressList...
  2. Rebuild the solution.

In Windows Explorer

Copy the following files from the build directory (..\..\..\..\Program Files\Microsoft Configuration Manager Console\AdminUI\bin\) to the MDT installation directory : C:\Program Files\Microsoft Deployment Toolkit\Bin (be sure to have a backup copy of the replaced files):

  • Microsoft.BDD.Actions.dll
  • Microsoft.BDD.ConfigManager.dll
  • Microsoft.BDD.SCCMActions.dll
  • Microsoft.BDD.Wizards.dll
  • Microsoft.BDD.Workbench.dll

In the Registry Editor

As we rebuilt the Microsoft.BDD.Workbench.dll, the signature has changed and so the registered SnapIn does not reflect the changes.

Locate HKLM\Software\Microsoft\MMC\SnapIns\FX:{FFB8695A-66B4-4929-ABB6-15CB8BD2AE3D} and edit the Type value and replace the strings in bold by the reference of the rebuilt DLL :

Microsoft.BDD.Workbench.PropertySheetSnapIn, Microsoft.BDD.Workbench, Version=0.0.0.0, Culture=neutral, PublicKeyToken=b5c6490be595e62f

image

You can retrieve the PublicKeyToken with .NET Reflector :

image

In SQL Server Management Studio

  1. Add the fields you defined in the DatabaseDetails.cs in the dbo.Settings table :

    image
  2. Modify the view dbo.ComputerSettings :

    image 

    Verify that the new fields are selected and save this view...

In the Workbench

There is nothing to modify in the CustomSettings.ini as the variables OSDAdapter0IPAddressList and so on are already known variables (look at the ZTIGather.xml located in the Scripts folder) but you have to define fake variables in the task Apply Network Settings to make the Lite Touch process identifies the target machine has TCP/IP configuration to set :

image

You can now add the value through the Workbench :

image

If you plan to add custom data that are not already represented by a known variable, you will have to add it to the CustomSettings.ini :

[Settings]
Priority=...
Properties=MyCustomData1, MyCustomData2, ...

Isn't that cool ?

But remember that this kind of customization is quite heavy and will require a redo when you will update to next versions of MDT... and this will also not be "fully" supported (as usual, Microsoft Support never leaves you alone and provides "Best Effort" support at least).

Note that this post is provided "as is" with no warranty nor supportability engagement. It does not engage Microsoft at all.
Nevertheless if you consider this not clear, incomplete or inadequate, please let me know !

Published Friday, May 09, 2008 11:13 PM by GuillaumeD

Comment Notification

If you would like to receive an email when updates are made to this post, please register here

Subscribe to this post's comments using RSS

Comments

# Explorer &raquo; How to customize the MDT database and&#8230; the Workbench

# re: How to customize the MDT database and... the Workbench

Joli Guillaume ;)

ca me rappelle un peu ca http://blogs.msdn.com/dsebban/archive/2007/07/16/modifications-du-workbench-bdd-2007-ajout-d-un-champ-personnalis-dans-la-base-de-donn-es.aspx :)

mais c'est vrai que ton article est vraiment très complet.

Thursday, May 29, 2008 4:25 AM by David Sebban [MSFT]

# re: How to customize the MDT database and... the Workbench

Hi Guillaume,

Very good article.  Without the functionality to deliver static IP info, I don't know how MDT could be considered a server deployment tool.

I have been making use of your hack to associate TCP/IP settings with computer records in my MDT database.  It has been working well, but now I am trying to get fancy and I'm not having much luck...

I've been trying to scatter various bits of TCP/IP info across different roles.  The computer gets its specific IP address from its own record, but WINS and DNS settings are assigned to a role so I don't have to repeat the values all over the place.  I then assign the role to the appropriate computers.  The problem is that this isn't working.

When I spread the data across the roles as I described, the computer only gets installed with the dummy values from the Task Sequence.  Why is this?  Is there a way to correct this behaviour?

I know the computer is getting my roles because other settings such as organization name or target OU are being delivered.

Thanks for any help you can offer,

Gordon

Monday, October 06, 2008 4:29 PM by Gordon Martin

# re: How to customize the MDT database and... the Workbench

Hi,

Wouldn't setting OSDAdapterCount remove the need for a fake entry in the TS?

Anders

Friday, January 09, 2009 11:25 AM by Anders

# Custom XP Image Deployment with MDT 2008 results in reboot into Safe Mode only

We have configured MDT 2008/Workbench and developed a custom XPSP3 Image for an HP5100. We syspreped the image and pushed up to the MDT 2008 server with WDSCapture GUI.

We can successfully re-deploy this image via PIXE to the same HP Hardware.  However, when we deploy to alternate HP Hardware (D510 or 530), the image is pulled down with PIXE successfully but the machine reboots into safe mode only. No matter which option you choose, start windows in safe mode, etc, it reboots to the same place.

We uploaded the drivers for the various HP models into the out-of-box drivers section so we feel that the correct drivers should be injected (we can see the "injecting drivers" section) during the image deployment.

What are we missing; a storage driver for the alternative model?

We found an issue with similar HP machines but the tech tip suggests that we fix Win PE 2.0 by adding a new registry key to resolve the issue. Since the method we are using to deploy an image via PIX is simple and clean, can someone let us know how to add this registry entry as part of our litetouch deployment?  

More Info:

When using Windows PE 2.0 for scripted installs or sysprepped images of Windows XP SP2 the setup fails, rebooting/hanging on loading mup.sys or appears to have HAL or other driver issues…

Cause

Windows PE 2.0 has a new way of writing partitions to the disks compared with Windows PE 2004/2005. Some BIOS (like HP D530, HP DC5000, HP DC5100) is not compatible with this method. However, there is a workaround...

Solution

Fix Windows PE 2.0 by adding the following registry keys before running diskpart.

My .reg.file

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SYSTEM\CURRENTCONTROLSET\SERVICES\VDS\ALIGNMENT]

"LessThan4GB"=dword:00000000

"Between4_8GB"=dword:00000000

"Between8_32GB"=dword:00000000

"GreaterThan32GB"=dword:00000000

Thanks

/JQ

Thursday, January 22, 2009 3:48 PM by JQCHICAGO

# re: How to customize the MDT database and... the Workbench

a great option to replace this same functionality is webservices. i believe there are more posts on this or Shuffs blogs about utilizing them. Gives you a global replacement without having to rebuild your modifications every time a new MDT release hits the shelf

-Dustin

Monday, March 09, 2009 3:07 PM by Dustin

Leave a Comment

(required) 
required 
(required) 

  
Enter Code Here: Required
 
Page view tracker