Menu
Amazon WorkSpaces Application Manager
Administration Guide

Adding Required Applications or Scripts

Some applications may require additional applications or scripts to run in order for the packaged application to run properly. These additional applications or scripts may need to be launched before, during, or after the packaged application launches. For example, you may need these additional applications or scripts to do the following:

  • Configure plug-ins for office suites and browser applications

  • Configure virtual printers

  • Start a background application before the packaged application

To launch these additional applications or scripts, you can use a configurable AppEvent trigger. A configurable AppEvent trigger is an action you set in Amazon WorkSpaces Application Manager Studio that runs a handler to launch these additional applications or scripts. The handler can be an application written in any programming language, such as C++, or a script in a scripting language, such as VBScript.

Applications used in a configurable AppEvent trigger can be any size while scripts have to be less than 10 Mb in size. Applications or scripts added to the package cannot be directly modified. If the application or script is modified in the package, Amazon Studio or Amazon Admin Player disables the application or script.

Sample Applications and Scripts

The packaging instance contains the following sample applications and scripts in C:\Program Files\Amazon\WAM Admin Studio\Samples.

Filename Description Error codes

AddService.exe

Adds and starts a service

-1

DotNetCheck.vbs

Checks for the Microsoft .NET Framework. Specify the major and minor version number to check in Parameter.

1

DirectXCheck.vbs

Checks for a specific version of Microsoft DirectX. Specify the major and minor version number to check in Parameter.

1

OpenFirewall.vbs

Opens the firewall for the specified program or ports.

-1

OSMemCheck.vbs

Check for sufficient memory.

-1

QuicktimeCheck.vbs

Checks for specific version of Apple QuickTime. Specify the major and minor version number to check in Parameter.

1

ReaderCheck.vbs

Checks for a specific version of Adobe Reader. Specify the major and minor version number to check in Parameter.

1

RemoveService.exe

Stops and removes a service

-1

Handler Errors

If the handler returns a failure code, Amazon Studio logs the failure code but does not display any messages for error codes. The handler must display a message for error codes. If the failure occurs during the activation trigger, the application is not added to the Amazon Admin Player. If the failure occurs during the exit trigger, the handler continues.

Note

During a Windows logoff or shutdown, triggers are skipped because Windows does not allow a new process to be created during this time.

Adding a Configurable AppEvent Trigger

You can add a configurable AppEvent trigger through Amazon Studio.

To add a configurable AppEvent

  1. In Amazon Studio, choose Update to get the files in your package.

  2. Under 3. Optional settings, choose Settings.

  3. In the navigation pane, choose Configurable AppEvents and then choose Add.

  4. In the Configurable AppEvent Settings dialog box, do the following:

    • For Trigger, select when to launch the handler.

      Trigger

      Description

      After registration

      Occurs one time when the application is first added to the Amazon WorkSpaces Application Manager client application.

      After activation

      Occurs one time immediately after the application package has been activated (installation is triggered).

      After virtualization

      Occurs immediately after virtualization has completed (installation is complete).

      After launch

      Occurs immediately after the application launches.

      After exit

      Occurs after the application exits.

      Before deactivation

      Occurs one time immediately before an application package deactivates and the application is removed from the Amazon WorkSpaces Application Manager client application.

      Before devirtualization

      Occurs before devirtualization starts and the application is removed from the Amazon WorkSpaces.

    • For Frequency, choose when to launch the trigger.

      Trigger

      Description

      Fire Once

      The action only launches one time.

      Fire Always

      The action launches when the trigger occurs. If the trigger occurs only one time, then this action launches only one time.

    • For Handler command line, enter the path and required parameters for the handler. If the application or script is on Amazon WorkSpaces, choose Use local application.

      Warning

      When using the Extra parameter, be sure to not include the <, >, |, &, ^, “, #, %, {, }, \, ~, [, ], ‘, or space characters unless they are encoded by the portal and decoded by the handler. All characters appear as part of the value in the extra environment variable and do not need to be escaped.

    • For Handler launching, choose one of the following as required:

      Note

      This setting can affect critical files and should be used cautiously.

      Run elevated (only supported on Windows Vista or later)

      If the handler requires administrator privileges.

      Run as LocalSystem (only if allowed by group policy)

      If the handler should be launched as a system process. The application or script in the handler has same access to files as the user.

    • For After launching, choose Wait for handler to exit to require the handler to finish before the configurable AppEvent trigger in the Amazon WorkSpaces Application Manager client application goes to the next state. If this option is cleared, then the handler launches and the trigger continues with the normal operation in parallel. Set the Time out after in minutes or seconds for the trigger in the client to wait for the handler to exit. In Success codes, set a specific return value to indicate success or failure for the trigger. By default, 0 is a success code and all other values are failures. You can also set a different success code.

    • Choose OK to add the configurable AppEvent trigger.