Recently I read a request from a Technet
user about his requirements around generating a prompt with build options using
SCCM and / MDT only for SCCM OSD Task sequence.
I have done the similar prompts using
HTA, VB script and other third-party tools.
So I thought I will give a crack at this using MDT UDI Wizard Designer.
Surprisingly it took less than 10 min to create the prompt, which is easier
then creating from HTA, VB script or any other methods.
This is a quick article to explain how
to create build type prompt to technician.
In this how to document, we will edit
the existing UDIWizard_Config.xml file to customise the UDI pages. Make a copy
/ backup of default UDIWizard_Config.xml file before start editing xml file.
Then we will add a custom page to the UDI Wizard with few labels and assign task
sequence variables to those labels.
Go to Start -> All programs -> Microsoft
Deployment ToolKit
Launch UDI Wizard Designer
as administrator. If we launch UDI Wizard designer as normal user, we won’t be
able to save the UDIWizard_config.xml file back to MDT Share. That is why the
UDI Wizard Designer has to be launched as Administrator.
Select Open from the Home tab then browse to the location of UDIWizard_Config.xml in your MDT
installation path or the location where MDT package is stored. UDIWizard_Config.xml file will be located in
%MDT Package%\Scripts\.
Opening the UDIWizard_config.xml file
will display there StageGroups by default.
Expand StageGroup: New Computer;
By default the new computer stage has 11
different pages. If required we can customise them as needed. To remove a page
from stage group; right click on the page then click on Remove Item;
I have removed all the default pages
then added 4 custom pages Welcome, Deployment Readiness, Language and Install
Program pages. Now we will add “Choose build type” page to the StageGroup.
Click on Add Page from ribbon; then Select Build your own page from Add
a Page to the Page Library window
Give unique display name and page name
to the page. I have named the display name and page name “Choose Build Type”.
Now this page will be added to the page library on the left side of the column
in UDI Wizard. Select build Type page from page library then drag it to New
Computer stage group, place it in-between other pages as desired.
Now the StageGroup: New Computer will
look as below;
Select newly added page, click on Configure.
This will open My Custom Page canvas where we can add our customization.
On the canvas I will add 3 radio buttons
and name them Pre Stage, New Build and Rebuild.
On the Layout tab we will add
a Label for each of the radio button
(Pre Stage, New Build, Re build), add Value
for each label (PreStage, NewBuild, ReBuild).
On the Settings tab we give task sequence variable name (BuildType).
So what happens here is when we use the
task sequence variable ‘BuildType’ it validates the values, when the values
returns true the task will be executed.
Save the UDIWizard_config.xml file then exit the UDI Wizard designer.
Distribute the updated MDT package to all the distribution points.
Till this stage we have completed
designing a page, created labels with values and task sequence variable.
Next we need to integrate the UDI page
to the task sequence and create a task to validate the task sequence variable.
For testing purpose I want to create a pause step and this step will be
executed by task sequence if the Task sequence variable for BuildType is equal
to PreStage.
Open an existing task sequence in edit
mode, add Run Command line step then
add following command
cscript.exe
"%DeployRoot%\Scripts\UDIWizard.wsf"
Start in: %TOOLROOT%
I will be using previously created
package (TSPaused)
package to pause the task sequence. Identify a step where we want to add a pause
step then Add Run Command line step to the task sequence configure the step as below;
On the Options tab, select Add
conditions then choose Task Sequence Variable. On Enter the task sequence
variable to evaluate;
Variable: BuildType
Condition: equals
Value: PreStage
Then click OK.
When the step is complete, the task will
look like as below;
Save the changes and exist the task
sequence editor.
Now the time to test our work.
Boot up a machine, select the task
sequence which we have updated with the UDI and Pause package. When the task
sequence reaches the UDI page, we will be prompted UDI window for action.
The UDI Wizard will display the first
screen - Welcome Screen;
Deployment Readiness;
Time Zone selection;
Build Type;
and install applications;
Once we click on Finish button, the task
sequence will continue.
When the task sequence reaches Pause
task, it will evaluate the condition. On
the built type selection I have chosen PreStage
so the condition will validate as true /equal then executes the task and
populates the pause window as below;
That’s it. We have successfully created
a user selection options, populated custom task sequence variable then
validated with task sequence.
More over everything has done with SCCM
and MDT, no scripting and no third-party tools involved.
Hi do you know how to make this possible, I need to enter computer name and owner as well as departments in my company,I have no clue: http://tinypic.com/r/eskk6w/8
ReplyDeleteThanks,
Hi there,
DeleteIt is possible. Edit the UDI pages as required.
Cheers,
Venu
how get computer name based on selected country code + Desktop/Laptop suffix + serial number
ReplyDelete