SCCM 2007 + MDT 2010: Application in multiple roles

December 13, 2012


Today I had a little discussion about how MDT handles duplicate applications within roles. The environment consists of SCCM 2007 and MDT 2010 where MDT is used to store the configuration of client computers mainly to use MDT roles for software installation during task sequences.

The situation at that customer is that some applications can be member of multiple MDT roles which (I thought) would result in the fact that the application would also be installed multiple times. Let’s put this theory to the test.


–          3 roles:

  • Role 1: contains 23 applications
  • Role 2: contains 1 application
  • Role 3: contains 3 applications. All 3 applications are already member of Role 1 or Role 2

If MDT reacts to duplicate applications as I except I would see during the task sequence that all 27 applications will be installed. To see how many applications would be installed the ZTIGather.log can be checked on the client device during the execution of the task sequence.


When we open the logfile and check for the array containing all applications we expect to see PACKAGES001 up to PACKAGES027. But surprise was great when we only saw PACKAGES001 up to PACKAGES024. The difference is 3 which means that MDT has filtered out the 3 duplicate applications from role 3.

When checking the ZTIGather.log we can also see that the returned records count of the SQL query for all Packages in the Roles associated to the computer is 27.


This means that MDT detects that there are 27 applications in the 3 roles but at some point sees that there are a number of duplicates which are ignored while filling up the packages array.

Nothing can be found int the ZTIGather.log which states that the duplicates are ignored. That’s why I went deeper into investigating the ZTIGather.wsf script which contains all intelligence in processing the MDT data.

After some digging in the script I’ve found a function called QuerySQL which obviously will be used to get the right information from the SQL database and put it in the BDD.log. In that function there is a routine that processes the output of the SQL query.


While looking in more detail at the above code I noticed there is a line which has been put in comment stating:

“oLogging.CreateEntry “Value ” & oRS.Fields(cStr(sColumn)).Value & ” already found for ” & sElement, LogTypeInfo”

The statement ‘already found for’ made me suspicious so I’ve put this line of code out of comment and when I ran the script another time the ZTIGather.log showed the following output:


So basically the ZTIGather.wsf has the intelligence to detect duplicate applications, packages,… but doesn’t show this in the various logfiles, which is rather weird in my opinion.

I hope this gives you guys a better insight in how MDT handles applications.




SCE 2010 Installation error: This instance cannot be used for the Essentials database

January 30, 2012

When will you be faced with this problem?

  • New installation of SCE 2010
  • WSUS is already installed using an existing SQL server standard for its database

Problem description

When installing System Center Essentials 2010 for a client I faced the following error: “This instance cannot be used for the essentials database because it does not contain the windows server update services database”.

As you all know, WSUS needs to be installed on the SCE server. I knew the instance hosted the WSUS database. The problem is, that the SCE installer looks at the following reg key to locate the database server that is used by WSUS:

  • HKEY_LOCAL_MACHINESOFTWAREMicrosoftUpdate ServicesServerSetupSqlServerName

When installing WSUS, it will enter the FQDN of the SQL server in this registry key. The SCE installer can only cope with the NETBIOS name, which results in the error above.

The solution

How to solve this issue? Replace the FQDN by the NETBIOS name in this registry key:

  • HKEY_LOCAL_MACHINESOFTWAREMicrosoftUpdate ServicesServerSetupSqlServerName

And now bye bye installation error!

Ow yes, do not forget to not select “use microsoft update or installation” further on in the wizard or the install will fail. Long live bug-free installers J.