Deploy Java Runtime Environment as SCCM application using PSADT

This guide will show you how to deploy Java Runtime Environment (both 32- and 64-bit) via SCCM with user interaction using PSADT. The app will do the following:

  • Prompt user to close Java apps
  • Uninstall previous JRE(s)
  • Install both 32- and 64-bit JRE
  • Disable update notifications

Get the files

Get latest offline executable JRE installers, as well as latest PSADT (3.70 as of writing). Also, get ServiceUI.exe (32-bit) from MDT if your SCCM version is less than 1802.
Copy both installers to the PSADT Files directory. Next, let’s modify Deploy-Application.ps1.

Install Script

Variable declaration
Let’s start by declaring some global variables. Specifically check that $appVersion is current. In general take model of following:

Pre-installation

Pretty straightforward. If user is running java app, allow closing of app, or deferral. Also show installation progress.
As part of the installation, we remove previous versions of Java.

Install

In the install phase, let’s set install parameters to e.g. disable Java auto-updates.
Lastly, for all .exe installers in the Files directory, execute them. This shall install both 32-bit and 64-bit Java.

Post-install

Not much here. If Java was running in the beginning, show a prompt to user to inform of successful update.

Uninstall

Basically copy the pre-install commands, i.e. Show-InstallationWelcome,Show-InstallationProgress and Remove-MSIApplications.

Application in SCCM

For SCCM => 1802:
Create application as you normally do. For deployment type, select Script Installer.
For installation program command, use Deploy-Application.exe.
For uninstallation program command, use Deploy-Application.exe Uninstall.
For User Experience, choose “Whether user logged on or not” and check “Allow users to view and interact”.

For SCCM < 1802:

Create application as you normally do. For deployment type, select Script Installer.
For installation program command, use ServiceUI.exe Deploy-Application.exe.
For uninstallation program command, use ServiceUI.exe Deploy-Application.exe Uninstall.
Lastly, check to run in 32-bit. For User Experience, choose “Whether user logged on or not”.

Detection method

Use the following for detection method, please check that you have correct version declared.

That’s it.

Deploy FileMaker Pro 16 as SCCM application using PSADT

This guide will show you how to create a FileMaker Pro 16 SCCM application with user interaction using PSADT. The app will do the following:

  • Install FM Pro 16 with latest patch.
  • Apply licensing information.
  • Set default remote server.
  • Optionally remove previous FM Pro versions.

Get the files

Get latest FM Pro installer and patch, as well as latest PSADT (3.70 as of writing). Also, get ServiceUI.exe (32-bit) from MDT if your SCCM version is less than 1802.

Run the Installer, but cancel it. The installer will have created a subfolder called “FileMaker Pro 16”. Inside, copy contents of the Files folder into PSADT Files folder.

Next, do the same thing with the latest updater. Copy the .msp file into PSADT Files folder.

Installation script

Fill out the default application variables in the beginning of Deploy-Application.ps1.

Here’s the pre-install step. Mostly self-explanatory but I explain some things.
First, we declare variables. Shared variables (both install and uninstall) are the application name and process name.
For installation, we get currently installed application information. Later on, if previous installation exist, we only need to patch.
Most important is the $addParams variable. Include here your FileMaker license information.
For $FMserver variable, insert address of your FileMaker server. This will later be set as the default server when user opens the app.
Under pre-installation tasks, in this case we remove previous FileMaker Pro 14 installation. Modify as needed.

Next up, install step.

Basically two-liner. If there is no previous installation, perform full install. If there exists previous version, then the patch is all we need.

Post-installation step. Here we declare registry entries, which includes default remote server and skips “getting started”. Then we apply these registry entries to all users. Lastly, display popup for successful installation.

Uninstall step is a one-liner.

Create application in SCCM

Create application as you normally do. For deployment type, select Script Installer.
For installation program command, use ServiceUI.exe Deploy-Application.exe.
For uninstallation program command, use ServiceUI.exe Deploy-Application.exe Uninstall.
Lastly, check to run in 32-bit.

UPDATE: As of SCCM 1802, you no longer need ServiceUI for user interaction, instead, check the box to allow user interaction in the user experience tab. You may also uncheck the 32-bit installation process, to allow native 64-bit.

Detection method

Remember to check correct version.

Deploy
Lastly, you may deploy the app. You may set it to run as whether user is logged on or not.
Remember to test thoroughly before deploying to production.