Welcome to the second post in my three-part series on Operating System Deployment Frontends. In the first blog, I explained how frontends work and covered task sequence variables. In this post, we move on to how to use a frontend and more implementation advice.
Frontends in ConfigMgr OSD can be launched in three different ways; each of course has its pros and cons.
Figure 1 shows a very basic frontend written in VBScript that is used as an example in the upcoming sections of this article. This basic frontend asks a single question and populates a single task sequence variable named PlayGame.
This is the most obvious way to run a frontend. You simply create a package for the frontend’s source files then using a Run Command-line task within the task sequence, you initiate the frontend with the proper command-line. You could also use a program and an Install Package task; however, this is a bit less flexible and since it’s not actually installing anything, could be a bit misleading.
Because the frontend is soliciting input from the user, you want to place this task as close to the beginning of the task sequence as is possible. Figure 1 shows calling the basic frontend from within a task sequence.
Running a frontend as a prestart command ensures that it is run at the very beginning of the OSD process. This works out quite well if the frontend will drive the task sequence that will be used by setting the SMSTSPreferredAdvertID task sequence variable – for complete how-to and example on using the SMSTSPreferredAdvertID task sequence variable, see https://www.niallbrady.com/2014/04/15/how-can-i-make-multiple-hidden-task-sequences-available-on-demand-in-configuration-manager-2012-r2/. Figure 4 shows a prestart command added to a boot image. This method is mainly only applicable to the new computer scenario because it only executes the prestart command when the system boots into the boot image.
The final way to execute a frontend is as a run first program. This method is only valid if the task sequence is started from within Windows on a currently managed system and thus is primarily for refresh scenarios. It enables the frontend to run before the task sequence is ever executed and also overcomes the challenge of showing the UI since ConfigMgr can automatically display UI on the current interactive desktop even if the program is executed as the local System.
The main challenge with this approach is that the task sequence variable COM object is not available. Thus, the frontend needs to provide a way to save the variables and the values that it sets and reload them at the beginning of the execution of the task sequence. Figure 2 shows running a frontend using this option.