Applications picker for SCCM/MDT

 

BUG: when after implementing this solution the customsettings.ini is not getting processed. Download updated version. Uninstall old one before installing this one.

Recently, I was moving my customer from MDT to OSD with MDT extensions, and I was puzzled how to make a list of applications show up as a dialog before running a task sequence. MDT comes with a simple Computer Name dialog. I extended it with domain join credentials, local admin password, and, the most important part - applications picker. It goes to SCCM DB, and finds all programs from packages tagged word "Image" in the programm's description.

So, here is how to install and configure it:

  • Install the package, attached to this post on any x64 machine with MDT and WAIK installed. It installs all needed files under c:\Program Files\Microsoft Deployment Toolkit\ExtensionsByAlexSemi.
  • Supplemental Database.
    • You will need a database, sitting next to your production SCCM database on the same server. I usually call it SMS_Supplemental.
    • Open StoredProcedures.sql in SQL Query analyzer, and change SMS_<YOUR SITE CODE> to your SMS DB. Switch to your supplemental DB and run the query that will create SP for you.
    • I've found it easier to deal with SQL security (sorry, I know it doable without it, but I prefer simplicity here), so I create a SQL login, call it something like "MDTdatareader" and assign the password to it. I gave this account rights to read from necessary objects and execute my queries. Logon with this account and try to run 3 stored procedures you just created. To make sure they work.
  • Modify SCCM_Bootstrap.ini changing domainnames, accounts, etc. Everything that ends with "=" need to be filled up
  • CreateMDT Boot image using MDT extensions integrated with SCCM. Don't forget pre-execution hook checkbox.
  • Add imagex.exe from WAIK for x64 to your path variable in environment
  • In the elevated command prompt change the current folder and run
    alter_winpe.cmd <Path to the MDT image>. This will add needed files to your image
  • Update distribution points for your boot image.
  • Now, indicate some of the programs you want to publish in OSD by going to its comment and adding the word "image" into comment field. It can be anywhere in the comment field.
  • Done. If you did everything right, you'll be able to see your program in the list of applications, like on the screenshot.

 

Does it break any existing stuff?

 

I don't alter any of the standard files except wizard.hta, but even if you have customized wizard.hta, you can just add two includes.

 <script language="vbscript" type="text/vbscript" src="ZTIConfigFile.vbs"> </script>

<script language="vbscript" type="text/vbscript" src="ZTIDataAccess.vbs"> </script>

My script that alters image uses the standard scripts from MDT templates folder.

 

Here is what this program does in addition to applications picker:

  • 1. Suppresses cscript.exe command window like it described here
  • 2. Retrieves the old computer name by serial number. Meaning, if you're re-imaging the computer, it will show up old computer name even if you replace the hard drive ;)

 What are the limitations?

  • No folders. Sorry, SCCM does not expose folders structure in views
  • No bundles. And you can't use dependent programs if you had an idea to do it that way, not supported in the task sequence

What are the alternatives?

Modena

Why would you consider using this instead of Modena?

Well, my program, first, does not require any extra config files (I find it kinda cool :)), second - if you have existing investment in MDT, you would probably like to stay with MDT. Otherwise, I'd recommend using Modena.

ExtensionsByAlexSemi.msi