Daniel
Posts: 8188
Joined: Mon Apr 02, 2012 1:11 pm
Contact:  Website

How to display interactive user message during an Intune System deployment

Tue Nov 23, 2021 3:33 pm

Hi,

Let's suppose that you need to create a suite installer that wraps up one (or more) packages and it is silently deployed through an Intune deployment run under System account.

There may be the case when you need to display a UI message to the logged on user prior to silently installing the suite installer (through an Intune deployment run under System account). This requirement can be achieved using the "ServiceUI.exe" tool to launch a System account process in user interactive mode. The "ServiceUI.exe" tool is available within Microsoft Deployment Toolkit (MDT).

The currently attached sample includes a suite installer project with the following functionality:

1. incorporates two prerequisite packages

2. includes a custom action that launches the ServiceUI.exe tool to execute a PowerShell .ps1 script that displays a message box

3. the prerequisite packages are installed only if you agree with the ps1 message box otherwise the suite installer just exits


Here it is attached the sample:
sample.zip
(788.13KiB)Downloaded 5 times


Here are the detailed steps to create the suite installer project:

1. create a new Architect project type

2. go to "Product Details" page and uncheck "Register product with Windows Installer" option

3. go to "Prerequisites" page and add the setup packages you want to be embedded into your suite installer (the sample embeds two MSI packages)
screen1.jpg
screen1.jpg (169.88KiB)Viewed 3500 times

4. go to "Files and Folders" page and add as temporary file the "ServiceUI.exe" tool and a .ps1 script file that displays a message box
screen2.jpg
screen2.jpg (231.17KiB)Viewed 3500 times

5. go to "Custom Actions" page and add a "Launch EXE with working directory" custom action after "Wizard Dialogs Stage -> Paths Resolution" action group; configure the action to launch "ServiceUI.exe" tool

6. select the above custom action and, while keeping the [SHIFT] button pressed, drag and drop it under "Install Execution Stage -> Paths Resolution" action group; this way the custom action will be shared by both installation stages (UI and install execution)

7. click on "Advanced execution scenarios..." hyperlink and select the "Skip action in Install Execution Stage if executed in Dialogs Stage" option
screen3.jpg
screen3.jpg (331.41KiB)Viewed 3500 times

8. go to "Install Parameters" page and check "Run as administrator" option

9. build and test the suite installer setup

All the best,
Daniel
Daniel Radu - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Sample Projects”