If you have been doing application deployment with ConfigMgr there’s a high lightlyhood you’ve came a cross Powershell Application Deployment Toolkit (PSADT) which is tool that helps you create a framework for wrapping the installation process for applications and some technical benefits in the form of logging information, GUI for the end-user where they can see the progress of the installation and being able to defer the installation, give balloon tips, do post and pre-installation tasks and much more.

We can use the PSADT when deploying Win32 Apps in Intune as well and it follows the same principals as with ConfigMgr. In this post I will give you a rough overview on how to use PSADT in Intune but if you are totally new to Intune and PSADT I recommend you find other resources to read up on Win32 Apps in Intune and PSADT in general before reading this post.



Find out more about the toolkit here

https://psappdeploytoolkit.com/



Prerequisite and steps

Before we start we need to make sure we have the Win32 content prep tool and PSADT downloaded. I always recommend using the latest version if possible.

Win32 content prep tool can be found here

https://github.com/microsoft/Microsoft-Win32-Content-Prep-Tool



PSADT can be found here

https://github.com/PSAppDeployToolkit/PSAppDeployToolkit

Application (Source)

First we need to get the installation files for the application we want to deploy, that could be a EXE, MSI or any other file. We also need to figure out what switches are required to do a unattended installation within our installation script. MSI’s follows a standard when it comes to switches where EXE’s can be more somewhat random depending on the developer. Reading the documentation for the application is important or just do some A B testing to figure out what works.



The example I’m using in this post is WinRAR which comes in a .EXE and the command for doing a silent unattended installation is -S



“WinRAR.exe -s” will perform a silent installation of the app with default settings.



PSADT



Now its time to take the unattended command we have for our application and apply that in to the PSADT script and customizing PSADT to do what we want it to do. Add the source files to the “Files” folder.



Win32 content prep tool



Next step will be to use the Win32 content prep tool to wrap everything together in to a .INTUNEWIN file that we will be uploading in to Intune.



Upload and create a Win32 app in Intune



As we would do with any Win32 app in Intune we create a new app and upload the content and assign it to our devices or users.

Creating our Win32 deployment



As mentioned earlier in this post we need make sure we have the application and all source files ready to go and that we know which commands to use for the unattended installation.

Copy the source files in to the “Files” folder where you have the PSADT content.

Next edit the Deploy-Application.ps1 script to perform the installation routine you want.

Now it’s a good time test the installation on a computer by running the Deploy-Application.exe to make sure the installation does what you want it to do. Remember that often you want to run the installation as SYSTEM unless there’s something specific reason for running it in a user context but make sure to do the same when testing the application before deploying it with Intune. This will save you a lot of time if you need to do some troubleshooting later on.

Side note.

To run something like SYSTEM I often use psexec to elevate to SYSTEM context and from there I run the installation. psexec is a part of the Windows Sysinternals and can be found here

https://docs.microsoft.com/en-us/sysinternals/downloads/psexec

Next we will create our INTUNEWIN file with the Win32 prep content tool just as we would do with any other Win32 app and point to the folder containing PSADT and our source content.

Once we have our INTUNEWIN file we create a new Win32 App in Intune, upload the file and under

Program we need to define our Install and Uninstall commands

Install command: Deploy-Application.exe

Uninstall command: Deploy-Application.exe -Deploymentype Uninstall



fill out the rest of all the required things related to a Win32 App and assign the app to your test users to make sure the app installs the way you want it to and…….. Exit code [0] = success !

One last thing

I haven’t spent any time on testing out the User-interaction part of PSADT with Intune and I dont think it would work “out of the box”. Think we need to do some tinkering in the execution of the Win32 app but that’s for another post.

Leave a comment or question in the comment section below.

That’s all for now and until next time, cheers !

Don’t forget to follow me on twitter and you can also find me blogging over at http://blog.ctglobalservices.com/