Can I use ServiceUI.exe to launch other programs besides the UDI Setup Wizard?

In a previous blog post located here we outlined how to create an interactive task sequence experience and detailed how to interact between a system session and a user session. Although it is not our recommended approach, as we would like you to use the tools available, sometimes customization outweighs using an in box solution. So in this blog post I will outline how you can launch your own customized wizard using the same technique we use to launch the UDI wizard.

Launching an EXE

You can use the same command line that UDI uses in order to launch your customized wizard. Although the UDI wizard has a script wrapper to do a few other things to launch the wizard interactively it follows this simple command line process:

ServiceUI.exe -process:tsprogressui.exe Wizard.exe

In this example ServiceUI will look for which session tsprogressUI.exe is running in so it can display my.exe to it. However, because it was launched from the task sequence it will be running in system context.

If you were to run from the UDI task sequence you would probably want to use the already defined task sequence variables in order to specify the paths of your custom wizard. Of course you must first update your scripts package to include your custom wizard executable.

Here is an example:

%ToolRoot%\ServiceUI.exe -process:tsprogressui.exe %ScriptRoot%\MyCustomWizard.exe

image

 

Launching an HTA

Launching an HTA will be very similar as the process outlined above, but instead ServiceUI.exe must launch mshta.exe which in turn calls your customized HTA. Here is an example:

%ToolRoot%\ServiceUI.exe -process:tsprogressui.exe %SYSTEMROOT%\system32\mshta.exe %ScriptRoot%\MyCustomHTA.hta

image

Comments

  • Anonymous
    January 01, 2003
    The comment has been removed
  • Anonymous
    January 01, 2003
    The comment has been removed
  • Anonymous
    May 21, 2014
    @Anati, the machines that have this failure where running the TS without a logged on user, therefore the tsprogressui.exe process is not launched.
  • Anonymous
    November 06, 2014
    This is working great for me with one small exception. I am able to launch the HTA, but it launches behind other active windows. How can it be forced to launch as the active window?
  • Anonymous
    July 06, 2015
    Since Configuration Manager task sequences usually run as the System account, the task sequence cannot
  • Anonymous
    January 29, 2016
    To hide the current TS this should be in the HTA outside of any Sub
    'Hides Task Sequence Progress'
    Set ProgressUI = CreateObject("Microsoft.SMS.TsProgressUI")
    ProgressUI.CloseProgressDialog
  • Anonymous
    March 02, 2016
    Has anyone been able to get this to work via a PowerShell script that opens a .Net windows form...?

    Thanks