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.
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 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
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:
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
@Anati, the machines that have this failure where running the TS without a logged on user, therefore the tsprogressui.exe process is not launched.