The Deployment Bunny has posted another great blog post on Modifying the Lite Touch Wizard.
This is the second part of a story around the MDT Wizard and the Wizard editor and the saga continues, but this time it’s going to be a bit more tricky since we need to add information to the wizard that does not exist by default in MDT. Last post was easy in the way that we just created a new page in the wizard that displays existing environment information, now the game has changed and my customer wants to have some hardware information, something like this:
The reason of having this page is to be sure that the machine has the correct hardware configuration, things like correct BIOS version, memory, CPU configuration but also to see that it has the Mac address that we “assume” it have. Also, we want to know if the model alias user exit script works correct and sets the correct model alias since we use that as a part of the driver group.
When I was working for a customer a while ago, they asked me if it was possible to modify the Wizard in MDT and of course I answered yes, since that is possible. They wanted many things and in this post I will cover the easy stuff. and that is reading from the existing environment and present it on screen during the deployment…
The requirements was pretty easy, something like…
-Could you help us to create a extra page in the wizard that will help the local tech to be able to see and verify that everything is correct when he is deploying the machine?
-You mean something like this?
-Yes, that would be ok, thank you.
Microsoft Deployment Toolkit–Lite Touch (LTI)-ComputerBackupLocation Behavior When Using A Replace Task Sequence Template
If you run a standard client task sequence template from within the OS, you will notice the Computer Backup wizard pane allows you to specify the location for the backup. If you have BackupDir and BackupShare values populated in the database or in customsettings.ini, then this path will be automatically filled out for you.
If you run a client replace task sequence template, this value won’t auto populate for you. What I noticed in DeployWiz_Initalization.vbs was that there was specific logic around ComputerBackupLocation when the DeploymentType was REPLACE as seen below.
I noticed there wasn’t any logic to set the DataPath using the BackupDir and BackupShare values. By adding the below logic, I was able to get the Wizard pane to behave as I would have expected it to and use the BackupDir and BackupShare values that I’ve provided in the database (or through customsettings.ini).
‘ CUSTOM – added logic for BackupShare and BackupDir when doing a REPLACE scenario
ElseIf UCase(property("ComputerBackupLocation")) = "NETWORK" then
If Property("BackupShare") <> ""AND Property("BackupDir") <> "" Then
DataPath.value = Property("BackupShare") & "\" & Property("BackupDir")
‘ CUSTOM – end added logic
####End Added Logic
This solution gave me the intended behavior I wanted. Now I’m sure the REPLACE logic is there for a reason, so instead of removing that logic, I simply added the behavior I wanted to it. I’m sure the MDT guys had a good reason for doing what they did.
Hope this helps.
Keith over at Xtreme Consulting has created a nice wizard driven tool for adding boot images to a USB flash drive. This is designed to work with MDT 2010.
Excellent work Keith!
There is actually a little known built-in feature for prompting you with a wizard screen to select the Deployment Share you want to connect to. There is actually a built in pane in the main deployment wizard that will only show up if you haven’t specified a DeployRoot value in bootstrap.ini
By default, if you don’t provide a DeployRoot value, then the wizard will pop up and allow you to manually specify the server location.
If you create a LocationServer.xml and put that on your boot image, then the wizard will display a drown down list of the Deployment Shares you have configured in the xml file. Here is a screenshot example.
You can see that I have 2 Deployment Shares to choose from in the drop down:
The tricky part that isn’t documented well is the LocationServer.xml file and what to do with it. Here is the correct format for the xml file as per the MDT documentation.
<?xml version="1.0" encoding="utf-8" ?>
Deployment San Antonio
This file needs to be added to the boot image. The easiest and most flexible way of doing this is by using an “Extrafiles” directory. The files added to this directory will be automatically added to the boot images when they are created or updated. This is the same method you would typically use for adding something like Trace32 to your 32-bit boot image.
I typically create an Extrafiles directory in the root of the DeploymentShare, so:
Then we need to add a Deploy\Control folder structure:
The LocationServer.xml needs to be in this Control folder.
Next we need to configure our boot images to use this Extrafiles directory. Go to the Windows PE x86 (or x64) Settings tab under your DeploymentShare properties:
Next configure the path for the Extrafiles directory you created.
Next we need to configure bootstrap.ini to allow the wizard to come up. Edit your bootstrap.ini:
You need to either remove or comment out your DeployRoot path that you have:
Next, update your DeploymentShare to rebuild your boot images.
Next you can launch your boot media through PXE (remember to update the WDS boot images), CD/DVD, or a USB thumb drive.
We have our Deployment Shares to choose from.
Once you select a share, you will be prompted for credentials to connect to that share.
After providing valid credentials, we see our Task Sequences to choose from.
If we had chosen the other Deployment Share, then we would have only see the following Task Sequences available to us.
That’s it! Hope you find this information useful.
Great post by Michael from back in June. People often want to filter the Wizard presented by LTI to only display certain things depending on what you pick. Michael has a nice post on how to use selection profiles to do just that.
Here’s a snippet:
I’ve talked with several people who have wanted to filter the list of items that are displayed in the Lite Touch wizard. Fortunately, that’s pretty simple to do as you can set the WizardSelectionProfile task sequence variable via CustomSettings.ini to specify the name of the selection profile that should be used to do the filtering: only the folders in the selection profile will be displayed for task sequences, applications, and language packs.
By default the UDI based task sequence will use the UDIWizard_Config.xml contained in your MDT 2010 Update 1 toolkit package. What if you want to use the same toolkit package for multiple task sequences, but provided different versions of the UDI wizard? For example, if you have different domains you want to join, or possible different applications to be presented to the user, or even skip screens for some task sequences. Well that is possible, but it’s buried in the documentation!
Reading The Documentation
First, here are the steps outlined in the MDT documentation under the section “Configure the OSD Setup Wizard Behavior.”
1. In the Configuration Manager Console, go to Computer Management/Task Sequence.
2. Right-click task_sequence (where task_sequence is the name of the task sequence you want to edit), and then click Edit.
3. Beneath the State Capture phase, click the UDI Wizard task sequence step.
4. On the Properties tab for the UDI Wizard task sequence step in Command line, modify the text as follows (where path is the path to the configuration file which is relative to the Scripts folder and file_name is the name of the configuration file)
(If you put the xml files in the \scripts folder of your toolkit package, you don’t need to specify a path value, just as you will see I didn’t specify a path in my example below):
cscript.exe “%DeployRoot%\Scripts\UDIWizard.wsf” /definition:path\file_name.xml.
Note The above text appears on one line. The line wrap seen here is the result of document formatting constraints.
5. Repeat steps 3 and 4, substituting State Capture with Preinstall/New Computer Only.
6. Repeat steps 3 and 4 for any custom task sequence steps that run UDIWizard.wsf.
7. Click OK.
Performing The Steps
Now, lets show you how to actally do that.
First, in my toolkit package, you can see i have 2 definition xml’s:
Next, we will want to edit our task sequence:
First, we need to to go the first UDI Wizard step located under the State Capture phase:
Then we need to update our command line to add the /definition command and tell it what file to use, if you put the XML in the \scripts folder of the toolkit package then you won’t have to specify a path value here, you can just specify the file:
Perform the same actions for the UDI Wizard step under Preinstall/New Computer Only:
Perform this on any other custom step you might have added that calls the UDI Wizard, then click OK to save your changes:
Now, when we run the task sequence on our client, we’ll see the new welcome page i created to ensure that I’m using the new configuration instead of the default UDIWizard_Config.xml.
Using A Custom Variable To Define The XML
Now another interesting way to set a different XML is to take advantage of the MDT integration and use a custom variable. This would allow you have a single task sequence that could call any number of UDI config xml’s. You could take that a step further and use any number of MDT rules to define how that XML gets set, like based upon the location, or chassis type, or a plethora of other things, way cool! I think this is a fantastic idea and was proposed to me by Michael Niehaus in an email exchange we had. So lets show you how to do that.
First lets change our task sequence to use a custom variable we’ll call “UDIXMLFile”.
Next we will need to configure the customsettings.ini file for our settings package for this task sequence. So here is the package I am going to modify.
Here is a bone stock customsettings.ini file:
Here we’ve added a custom property of “UDIXMLFile”, and we’ve configured a value of UDIXMLFile=UDIWizard_Config_2.xml
Next, save your changes and make sure to update the distribution point for your settings package. Again we launch the task sequence on our client to verify it’s using the XML file we want.
So how about an example were we set different XML’s based upon the DefaultGateway. Here we’ll set a UDI config XML based upon whether you are in London or the United States. Maybe it’s something as simple as having a different welcome page message, or you’ve configured different OU’s to be selectable. Here is an example customsettings.ini where we’ve configured either a UDIWizard_Config_2 or UDIWizard_Config_3 file to be used depending on where you are located.
Just a quick example to show you some of the possibilities.
Hope this helps!
Maik has updated the Deployment Web Service to V7. This is a pretty easy upgrade from V6, you just need to replace all the files in your virtual directory with the new files, minus your web.config as that hasn’t changed and saves you from reconfiguring, and then recycle your app pool.
Here are some of the updates:
– AddComputer (MACAddress, UUID, ComputerName, SiteCode) : Adds a new computer to SMS/SCCM and returns the ResourceID if successful
– ClearLastPXEAdvertisementForCollection (CollectionID, SiteCode) : Clears the last PXE advertisement flag for all computers in the specified collection
– ClearLastPXEAdvertisementForComputer (MACAddress, UUID, SiteCode) : Clears the last PXE advertisement flag for the specified computer
– ClearLastPXEAdvertisementForComputerByID (RessourceID, SiteCode) : Clears the last PXE advertisement flag for the specified computer
– DeleteComputer (MACAddress, UUID, SiteCode) : Deletes a computer from SMS/SCCM.
– DeleteComputerAssociation (ReferenceComputerMacAddress, ReferenceComputerUUID, DestinationComputerMacAddress, DestinationComputerUUID, SiteCode) : Deletes an existing association between two computers
– DeleteComputerAssociationByID (ReferenceComputerResourceID, DestinationComputerResourceID, SiteCode) : Deletes an existing association between two computers
– DeleteComputerByID (ResourceID, SiteCode) : Deletes a computer from SMS/SCCM
– GetComputerName (MACAddress, UUID, SiteCode) : Returns the name of the specified computer
– GetComputerNameByID (ResourceID, SiteCode) : Returns the name of the specified computer
– HasAdvertisement (MACAddress, UUID, AdvertisementID, SiteCode) : Checks if a specific advertisement is available for the specified computer
– HasOSDAdvertisementByCollectionID (MACAddress, UUID, CollectionID, SiteCode) : Checks if an OSD advertisement is available to the specified computer limited by a specific collection
– RemoveComputerFromCollection (MACAddress, UUID, CollectionID, SiteCode) : Removes a computer from the specified collection
– RemoveComputerFromCollectionByID (ResourceID, CollectionID, SiteCode) : Removes a computer from the specified collection
– SearchComputerByName (SearchString, SiteCode) : Returns a list of computers with the supplied search string as part of their name/netbiosname
– GetComputerParentPath (ComputerName) : Returns the LDAP path to the parent object of the computer (helpful to save the current OU of a computer at the beginning of a deployment)
Fixed a bug in the GetComputerNameByNetbootGUID and SetComputerDescription functions.
– GetComputerRoles (SerialNumber, AssetTag, MacAddress, UUID) : Returns a list of Roles assigned to the computer