Creating Scripts that Run Before or After the App-V Application Is Streamed or Launched

AdminStudio 2022 | 23.0 | Virtual Package Editor

The Virtual Package Editor lets you add to your App-V package scripts that you want to be run at various stages: before or after the App-V application is streamed to the client, or before or after the App-V application is launched. You can create scripts that make changes that your application requires, either in the App-V environment or on the client system outside the virtual environment. For example, you may want to launch a script that ensures that a particular file or registry entry exists, or that synchronizes data inside the virtual environment with data outside the virtual environment.

Two different types of scripting are available:

Single command (HREF)—The App-V package references an external script or an executable file. The contents of the script are launched directly on the client system. The Command Prompt window is not displayed unless the process that is being called opens it.
Command script (SCRIPTBODY)—The contents of the script are stored in the App-V package and copied to a temporary .bat file in the root folder (typically under the Q drive) of the App-V package on the client system. The .bat file is launched from a visible Command Prompt window.

You can use either type of scripting to call an executable file that exists in the folder on the virtual application server where the App-V package is stored.

Each script that you create is associated with a target in your virtual package. Each target in your virtual package can contain one or more entry points, such as scripts and shortcuts. At the target level, the Virtual Package Editor enables you to configure information such as the file in your virtual application that you want to launch and the command-line arguments that should be used to launch the file. For a script, the Virtual Package Editor enables you to configure information such as when you want the script to be launched.

See Also