Skip to main content

Script Templates

Script Templates let you customise the PowerShell App Deployment Toolkit (PSADT) scripts that Robopack uses when packaging applications.

What is PSADT?

The PowerShell App Deployment Toolkit is a framework for standardising application deployment. It provides:

  • Consistent install/uninstall behaviour across all apps
  • User notification capabilities
  • Pre/post-install script hooks
  • Logging and error handling

PSADT versions

Robopack supports both PSADT v3 and PSADT v4.1:

VersionStatus
PSADT v3Default for new packages and flows
PSADT v4.1Available as a script template option

You can select PSADT v4.1 when creating a package or flow, or create your own custom template based on v4.1 in Settings > Script Templates.

warning

The commands supported by PSADT have changed between v3 and v4. If you have Custom App Settings that use PSADT commands, make sure you have migrated them before switching to a v4-based template.

Key differences:

  • v3: $installTitle for app name, Show-InstallationWelcome, Show-InstallationProgress
  • v4: $adtSession.AppName for app name, Show-ADTInstallationWelcome, Show-ADTInstallationProgress

Default template

Every Robopack organisation starts with a default PSADT template. This works out of the box for most applications. The default template:

  • Removes desktop shortcuts automatically after installation
  • Includes standard logging to C:\Windows\Logs\Software
  • Supports the Apps to Close feature from Custom App Settings
note

The default PSADT 3.10.2 template cannot be deleted or disabled as it is a system template.

Custom templates

You can create custom templates to:

  • Add pre-install checks (e.g. close running applications)
  • Configure user notifications (welcome dialog, completion dialog)
  • Add post-install configuration steps
  • Customise logging behaviour and log file locations
  • Set organisation-specific defaults

Dialog options

Script templates offer several options for PSADT dialogs:

OptionDescription
Welcome dialog — Show on installDisplays a prompt before installation. Shows the list of apps that need to be closed (from Apps to Close in Custom App Settings)
Welcome dialog — Show on uninstallShows the welcome dialog during uninstall as well
Only show if there are apps to closeThe welcome dialog only appears if one of the listed processes is actually running. Untick this to enable user deferral prompts regardless of running apps
Completion dialogShows a notification when installation finishes (with customisable text)
Toast notificationsInform users about installations in progress or completed
tip

If you want users to be able to defer installations, untick "Only show if there are apps to close" so the welcome dialog always appears with the deferral option.

Deferrals

When deferrals are enabled in the script template, users can postpone the installation. Key behaviours:

  • Pre-install scripts in Custom App Settings respect the deferral mechanism — users can defer before the script runs
  • PSADT deferral error code 6001 shows as 0x8007EA61 in Intune — this is expected behaviour, not a failure
  • The -CloseProcessesCountdown parameter controls how long users have to save their work before processes are closed

Apps to Close

The Apps to Close feature works together with script templates:

  1. Specify process names in Custom App Settings (without .exe extension — e.g. chrome not chrome.exe)
  2. Enable the Welcome dialog in the script template
  3. When the installation runs, users see a prompt listing the apps that need to be closed

Templates are managed in Settings > Script Templates and can be selected when building any package.

Logging

By default, PSADT installation logs are saved to C:\Windows\Logs\Software. You can change the logging directory in the script template settings. If you change it to the IntuneManagementExtensions\Logs location, logs will be accessible through Intune's diagnostic collection.

Installation script signing

Robopack automatically signs all generated PowerShell installation scripts. By default this uses a Robopack-generated certificate, which can be changed in Settings.

Robopack signs:

  • Deploy-Application.ps1 (the main installation script)
  • PSADT framework files in the Strings and Extensions folders (PSADT v4)
info

Customer-uploaded custom scripts (in Script Accessory Files) are not signed by Robopack. If your tenant requires all scripts to be signed, you must sign these separately.

ServiceUI support

ServiceUI is automatically included for generated script packages that need it, allowing PSADT dialogs to be displayed to users when the app is deployed in the machine scope. Robopack determines which ServiceUI version to use based on the target architecture.

Force Interactive

Under script templates, you can enable Force Interactive to use ServiceUI for all PSADT installations. This ensures the PSADT dialogs are always shown to the logged-in user, even when the installation runs in SYSTEM context.