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



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


Comments (7)
  1. Anonymous says:

    We seem to have encountered a minor bug with this when using Windows 7.  If the Time-out box is checked then the task fails with an error, however it works fine with no timeout.  It also works fine with a timeout on WinXP.  After spending an entire day troubleshooting and googling we finally found the answer here:…/543c05e5-8811-4a3a-83c9-49cbfb247b29

  2. anati says:

    Hi, I am using this method successfully to launch an HTA. I do get machines that have this failure, any ideas why? I know the client is healthy: Process Not Found: [tsprogressui.exe] ======================= Exiting with [-1] =======================Command line returned 4294967295. The operating system reported error 2147942405: Access is denied

  3. JFVanRoy says:

    @Anati, the machines that have this failure where running the TS without a logged on user, therefore the tsprogressui.exe process is not launched.

  4. wcoyote says:

    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?

  5. Anonymous says:

    Since Configuration Manager task sequences usually run as the System account, the task sequence cannot

  6. Spazzzen says:

    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")

  7. SCCM BiK says:

    Has anyone been able to get this to work via a PowerShell script that opens a .Net windows form…?


Comments are closed.

Skip to main content