I have created a small .exe file which allows users in our environment to create a Dev drive (our security settings doesn't allow the users to do it by themselves, the options are not accessible).
The GUI of this app is allowing the user to set the required drive size by themselves.
The app will then shrink the C: drive and create a Dev drive in the in the newly created free space.
To be able to work this apps needs to have admin privileges.
This app is deployed using Intune.
The previous version of the file was deployed using PSADT 3 and serviceui.exe (for the user interaction part).
I'm now trying to deploy it using PSADT 4.1.5 but I can't have the GUI.
The Install instruction is simple: Start-ADTProcess -FilePath 'Devdrive-1.0.1.exe' -WindowStyle 'Normal'
And the Intune install command is the following: Invoke-AppDeployToolkit.exe Install -DeployMode Auto
I can see the process running but I don't have any GUI window opening.
Can somebody tell me what I'm missing?
Thanks a lot in advance.
Alas, PSADT's GUI capabilities are limited in respect to using ServiceUI.EXE
PSADT GUI is split in two part that talk to each other:
A client GUI exe that runs in the same security context as the user. This is needed so that the user can see and touch it.
A Server exe that runs elevated. It tells the client what to do and waits for results
PSADT never exposes the GUI or any process or GUI thread launched from the installer EXE.
ServiceUI.EXE shows the elevated PowerShell console, PSADT GUIs and anything it launches (e.g. the installer EXE or MSI). Everything ServiceUI.EXE launches runs elevated and allows the user to interact with it.
IOW: if you have an EXE that must run elevated and be allowed to be touched directly by a user, ServiceUI.exe is required.
The only way for your EXE to interact with a user without ServiceUI.EXE is to split your EXE into 2. Run the GUI portion as the user and the repartitionner portion elevated. The hard part is getting them to talk to each other.
Just to expand on what @That-Annoying-Guy has said, you can do something like Start-ADTProcess -FilePath ServiceUI.exe -ArgumentList 'setup.exe /silent and is recommended instead of using it from the outside like you might have for 3.x and 4.0.