Scripts files can be used to configure the 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.
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>):
For more information about the default configuration directories, see Default and Custom Configuration Files.
Script Name | Execution Context | Description |
---|---|---|
Prestartup.bat | System context | Before file and registry database (index information) is read from Writable Volume or an application package. |
Startup.bat | System context | Before virtualizing a Writable Volume or an application package. Application is still not available to the user at this stage. |
Logon.bat | User context | Before virtualizing a Writable Volume or an application package. Application is still not available to the user at this stage. |
Shellstart.bat | User context | After virtualization has started for a Writable Volume or an application package, but before services from that package have started. |
Startup_postsvc.bat | System context | After virtualization has started and after services from an application package or a Writable Volume have started. |
Logon_postsvc.bat | User context | After virtualization has started and after services from an application package or a Writable Volume have started. |
Allvolattached.bat | System context | After virtualization has started for all the application packages assigned to the user. |
Allvolattached_shellstarted.bat | User context | After virtualization has started for all the application packages assigned to the user. |
Shellstop.bat | User context | During logoff processing, before virtualization is stopped for all the application packages and Writable Volumes. |
Logoff.bat | User context | During 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.
The following table lists these scripts and their corresponding trigger events:
Script Name | Execution Context | Description |
---|---|---|
OnPreLoadApp.bat | System context | Before file and registry database (index information) is read from the Writable Volume or an application package . |
OnPostLoadApp.bat | System context | After 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.bat | System context | Before virtualizing a Writable Volume or an application package. Application is not available to the user at this stage. |
OnPostEnableApp.bat | System context | After virtualizing a Writable Volume or an application package. Application is already available to the user at this stage. |
OnPostEnableAppAsUser.bat | User context | After virtualizing a Writable Volume or an application package. Application is already available to the user at this stage. |
OnAllAppsEnabled.bat | System context | After 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.bat | User context | After 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.bat | User context | Before stopping virtualization for a Writable Volume or an application package. Application is still available to the user at this stage. |
OnPreDisableApp.bat | System context | Before stopping virtualization for a Writable Volume or an application package. Application is still available to the user at this stage. |
OnPostDisableApp.bat | System context | After stopping virtualization for a Writable Volume or an application package. Application is no longer available to the user at this stage. |
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.
- C:\SnapVolumesTemp\MountPoints\{Appstack Volume Guid}\{App Guid}\Config\App
- C:\SnapVolumesTemp\MountPoints\{Writable Volume Guid}\{Writable Guid}\Config\App
- %SVAgent%\Config\Custom\App
- %SVAgent%\Config\Default\App
Precedence order of configuration directories when a Writable Volume is processed:
- C:\SnapVolumesTemp\MountPoints\{Writable Volume Guid}\{Writable Guid}\Config\Writable
- %SVAgent%\Config\Custom\<Writable Type>
The values of Writable type are
profile
,uia
, oruia_plus_profile
. - %SVAgent%\Config\Default\<Writable Type>
The values of Writable type are
profile
,uia
, oruia_plus_profile
.