Skip to main content

August 25, 2026

Batch Scripts for App Volumes workflow

Scripts files can be used to configure the Omnissa App Volumes workflow before or after the virtualization of individual application packages or Writable Volumes. You can use script files to modify the application and OS compatibility and for user or enterprise-specific requirements.

The script files are only applicable to a Writable Volume or an application package, so they are located inside the volume-specific default folders. There are multiple different scripts and these scripts get triggered at different events during the virtualization of each Writable Volume and application package. Some of these scripts are run in the system service context while others are run in the context of the logged-in user.

Note: Based on the content of the configuration batch scripts, executing them might have an impact on the performance of end-user login experience. Desktop and application availability might be delayed in some cases.

Internal Batch Scripts for App Volumes

The following table provides information about the default scripts which are either created by the App Volumes installer or can be created by the administrator in the default volume-specific folders (%SVAgent\Config\Default\<VolumeType>):

Important: These scripts are only read from the default configuration directories. If the scripts are created in any other location on the base image, Writable Volume, or application package, then such scripts are ignored. It is recommended to not change these scripts because the changes are not preserved across App Volumes upgrades.

For more information about the default configuration directories, see Default and Custom Configuration Files.

Script NameExecution ContextDescription
Prestartup.batSystem contextBefore file and registry database (index information) is read from Writable Volume or an application package.
Startup.batSystem contextBefore virtualizing a Writable Volume or an application package. Application is still not available to the user at this stage.
Logon.batUser contextBefore virtualizing a Writable Volume or an application package. Application is still not available to the user at this stage.
Shellstart.batUser contextAfter virtualization has started for a Writable Volume or an application package, but before services from that package have started.
Startup_postsvc.batSystem contextAfter virtualization has started and after services from an application package or a Writable Volume have started.
Logon_postsvc.batUser contextAfter virtualization has started and after services from an application package or a Writable Volume have started.
Allvolattached.batSystem contextAfter virtualization has started for all the application packages assigned to the user.
Allvolattached_shellstarted.batUser contextAfter virtualization has started for all the application packages assigned to the user.
Shellstop.batUser contextDuring logoff processing, before virtualization is stopped for all the application packages and Writable Volumes.
Logoff.batUser contextDuring logoff processing, after virtualization is stopped for all the application packages and Writable Volumes.

Customizable Batch Scripts for App Volumes

You can create or modify a different set of scripts in the custom configuration directories, which are not affected by App Volumes agent upgrades. Some of these scripts are run in the user context while others are run in the system service account. For more information about the default configuration directories, see Default and Custom Configuration Files.

Note: Administrator privileges are required for creating or modifying custom batch scripts.

The following table lists these scripts and their corresponding trigger events:

Script NameExecution ContextDescription
OnPreLoadApp.batSystem contextBefore file and registry database (index information) is read from the Writable Volume or an application package .
OnPostLoadApp.batSystem contextAfter Writable Volume or application file/registry database (index information) is read from the Writable Volume or an application package. Application is still not available to the user at this stage.
OnPreEnableApp.batSystem contextBefore virtualizing a Writable Volume or an application package. Application is not available to the user at this stage.
OnPostEnableApp.batSystem contextAfter virtualizing a Writable Volume or an application package. Application is already available to the user at this stage.
OnPostEnableAppAsUser.batUser contextAfter virtualizing a Writable Volume or an application package. Application is already available to the user at this stage.
OnAllAppsEnabled.batSystem contextAfter virtualization has started for all the application packages assigned to the user. Note: You can create this script only on the system volume (%SVAgent%\Config\Custom.
OnAllAppsEnabledAsUser.batUser contextAfter virtualization has started for all the application packages assigned to the user. Note: You can create this script only on the system volume (%SVAgent%\Config\Custom.
OnPreDisableAppAsUser.batUser contextBefore stopping virtualization for a Writable Volume or an application package. Application is still available to the user at this stage.
OnPreDisableApp.batSystem contextBefore stopping virtualization for a Writable Volume or an application package. Application is still available to the user at this stage.
OnPostDisableApp.batSystem contextAfter stopping virtualization for a Writable Volume or an application package. Application is no longer available to the user at this stage.

Note: To run a custom script in the user context, you can add an entry in the registry key, HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Run in the base virtual machine, Writable Volume, or application package.

Precedence order of configuration directories

If a custom script file is present in multiple locations, the script file is executed only from the highest precedent configuration location and other versions of the script are ignored.

Precedence order of configuration directories when an application package is processed:

  1. {Volume Root}\{App GUID}\Config\App or C:\SnapVolumesTemp\MountPoints\{GUID}\{App GUID}\Config\App

    {Volume Root} - indicates the root of the application package

  2. {Volume Root}\{Writable GUID}\Config\App or C:\SnapVolumesTemp\MountPoints\{GUID}\{Writable GUID}\Config\App

    {Volume Root} - indicates the root of the Writable Volume

  3. %SVAgent%\Config\Custom\App

  4. %SVAgent%\Config\Default\App

Precedence order of configuration directories when a Writable Volume is processed:

  1. {Volume Root}\{Writable GUID}\Config\App or C:\SnapVolumesTemp\MountPoints\{GUID}\{Writable GUID}\Config\App

    {Volume Root} - indicates the root of the Writable Volume

  2. %SVAgent%\Config\Custom\<Writable Type>

    The values of Writable type are profile, uia, or uia_plus_profile.

  3. %SVAgent%\Config\Default\<Writable Type>

    The values of Writable type are profile, uia, or uia_plus_profile.

Was this page helpful?

Provide feedback for this topic

Was this topic helpful?

Please do not include any personal or confidential information.

Generating link…