Docs / Automate / Post-Setup

Post-Setup

Automate execution of apps and scripts after installation.

Add files and directories to the image, and run tasks once at the end of Windows setup - or directly on the deployed installation when editing a live install.

Use the Add drop-down in the toolbar to add files, directories, commands, or one of the ready-made templates. Files can also be dragged and dropped onto the page. The entry type is detected from the file extension and shown in the Type column: installers, batch files, scripts (PowerShell, VBS), Registry files, Windows updates (MSU/CAB), images for the desktop background, or plain files to copy.

Before Logon vs After Logon

The page has two execution queues, shown as the Before logon (Machine) and After logon (User) sections:

  • Before logon (Machine) entries run at the end of setup, before any user account exists. They always run elevated, and since no one is logged on, every task must be fully automated - an installer waiting for input will hang the setup at the Finalizing screen.
  • After logon (User) entries run on the first user logon. They run elevated if the logged-on user is an administrator.

It is recommended to use the After logon queue unless a task specifically needs to run before user creation. Within each queue, entries execute top to bottom - reorder them with the Move up / Move down toolbar buttons.

Before Logon Mode

The toolbar offers three mechanisms for running the Before logon queue:

  • Default - runs after OOBE with a visible command-line window showing progress, and limited ability to interact with the UI.
  • Unattended - runs through the unattended answer file, requires the Unattended page to be enabled. No visible progress; use only with fully automated tasks.
  • Windows default - runs via SetupComplete.cmd. No visible progress, and it does not work with embedded or entered OEM product keys.

If using an OEM product key with the Windows default mode, enable the Unattended page → toolbar → OEM SetupComplete option, which re-hooks SetupComplete.cmd through the unattended RunSynchronous commands.

Entry Types

Each file row has a type selector deciding what happens with it during deployment:

  • Run - copy and run the file, then delete it from its temporary location once all tasks are done.
  • Copy - copy only, no execution. The file is placed at a permanent, editable destination on the image.
  • Command - a command-line instruction, no file attached.
  • Background - copy an image file and set it as the default desktop background (fit adjustable later via Windows Settings → Choose a fit).

Installers and Scripts

Executables, batch files, and scripts are copied and executed during deployment, then deleted from the temporary location. Make sure every installer has its correct silent switches set in the Parameters column - each row's parameters are edited directly in the grid. The Parameter Info toolbar button tries the help switch on the selected installer to list its available parameters.

An installer without silent switches in the Before logon queue will hang the installation at the login screen.

Registry (.REG) Files

REG files are copied and applied at the end of setup. While at first this seems the same as Integrate → Registry, the difference is that real integration writes directly into the image registry hives, while this one is delayed-applied at the end of Windows setup. This is useful for keys that are either reset during setup, break setup, or fail direct integration due to key permissions.

Windows Updates

MSU and CAB update packages added here are installed post-setup with the appropriate Windows tooling, useful for updates that resist offline integration.

Copied Files and Directories

Copy-type files and added directories are not executed - they are placed on the image for later use. Directories are added to the Before logon queue and copied with their content.

Destination

Copy-only and Background entries have an editable Destination column setting where the file lands on the deployed system, defaulting to the Windows\Setup directory. Run-type entries show Temporary instead - they are staged, executed, and cleaned up automatically.

Image vs ISO Storage

The Mode column selects where files are stored while traveling inside the image - the final destination on the deployed system is the same:

  • Image - files are stored within the install image, increasing the total WIM/ESD file size. Makes FAT32 media less feasible, but useful in scenarios where only a WIM file is used for deployment.
  • ISO - files are stored on the ISO using the $OEM$ directories, outside of the install image. Recommended when deploying from an ISO/USB, and the default for images loaded from one.

Using Copied Files in Commands

A copied file can be referenced by a later Command entry in the queue - for example, copy a configuration file, then run a command that consumes it. Select the copied row and its Parameters box shows the ready-to-use path syntax as read-only text, ready for copying into your command. Run-type files are staged under %WINDIR%\Setup\Files (Before logon) or C:\Windows\Setup\FilesU (After logon) until the queue finishes.

Templates

The Add drop-down includes ready-made entries for common tasks:

  • Disable hibernate - turns hibernation off post-install.
  • Disable user password expiration
  • Import host Start Menu layout - copies the current machine's Start Menu layout into the default user profile (available when host and image Windows versions are compatible).
  • Install VMware Tools (premium) - detects the host VMware installation.
  • CompactOS compression commands and an Edge WebView2 update entry.

Live Installations

When editing the currently running or another deployed installation, the same queue executes directly after pressing Process on the Apply page - no reinstall needed. The storage mode column is hidden since files go straight to their destination.