Scripting Settings

AdminStudio 2023 | 25.0 | Virtual Package Editor

When you select a script in the Shortcuts view, the following settings are available.

Scripting Settings in the Shortcuts View

Setting

Description

Event

Select the timing for the script that you want to launch. Available options are:

Pre-stream—The script or executable file runs after the end user launches the App-V application, but before feature block 1 of the application is streamed to the client system and before the virtual environment is set up. This type of script or executable file is run outside the virtual environment.
Post-stream—The script or executable file runs after the end user launches the App-V application and after feature block 1 of the application is streamed to the client system, but before the virtual environment is set up. This type of script or executable file is run either inside or outside the virtual environment.
Pre-launch—The script or executable file runs after the end user launches the App-V application, after feature block 1 of the application is streamed to the client system, and after the virtual environment is set up. This type of script or executable file is run either inside or outside the virtual environment.
Post-launch—The script or executable file runs after the App-V application is launched, but before the end user has access to the application. This type of script or executable file is run either inside or outside the virtual environment.
Post-shutdown—The script or executable file runs after the App-V application has been closed. This type of script is run outside the virtual environment.

Type

Specify the type of script that you want to be run. Available options are:

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.

Protect

Specify whether to run the script or executable file inside the virtual environment. Available options are:

Yes—The script or executable file is run inside the virtual environment. Protected scripts are useful for troubleshooting issues in the virtual environment.
No—The script or executable file is run outside the virtual environment. Unprotected scripts are useful for modifying the client system.

Wait

Specify whether to wait for the script or executable file to complete before continuing to the next scheduled task—either another script or the appropriate subsequent event.

Timeout

Enter the maximum number of seconds to wait for the script or executable file to complete before continuing. To wait until the script or executable file completes, enter the number 0 or leave this setting blank.

Success Result

Enter the return code that indicates that the script or executable file finished successfully. This setting is optional.

For information on triggering the appropriate behavior if the script fails or succeeds, see Causing the App-V Application to Close After a Script Failure.

Note:If you specify Post-shutdown for the Event setting, any value that you specify for the Success Result setting is ignored.

Abort Result

Enter the return code that indicates that the script or executable file failed. This setting is optional.

For information on triggering the appropriate behavior if the script fails or succeeds, see Causing the App-V Application to Close After a Script Failure.

Note:If you specify Post-shutdown for the Event setting, any value that you specify for the Abort Result setting is ignored.

See Also