Menu
Amazon WorkSpaces Application Manager
Administration Guide

Working with Environment Variables

You can set the environment variables used by your package by choosing the Environment tab in the project dashboard. You can see the environment variables in the package, add new environment variables, or change existing environment variables.

The Environment tab shows two types of environment variables: user environment variables (specific for each user and set in the registry under HKEY_CURRENT_USER \ Environment) and system environment variables (global for everyone and set in the registry under HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\Environment). These environment variables are set in the application or on the operating system depending on the Environment Variables setting in Virtualization in the Settings dialog box.

  • Environment variables shared on the entire operating system are added to the HKEY_CURRENT_USER\Environment registry key when you create the package. These environment variables are available to all applications for that operating system.

  • Environment variables visible only to the application are set in the process environment when the application starts in the operating system. Child processes of the application may inherent these environment variables but other process on the system cannot access these environment variables.

All virtual environment variables override any existing variables of the same name for either method. The only exception to this rule is for the %PATH% or %PATHEXT% variables. These variable are automatically appended to existing system values. For example:

PATH = %PATH%;c:\newfolder

For more information about setting environment variables, see How to propagate environment variables to the system in the Microsoft Knowledge Base.

Note

Some legacy applications may check the registry for environment variables under a specific hive and not use the variables in the process environment. For such applications, add the environment variables directly using the Registry tab in the correct locations and set the key disposition to Virtual-isolated (layer 4).

To add an environment variable

  1. In the Environment tab, open the context (right-click) menu in the pane, and choose Add Environment Variable.

  2. In the Add Environment Variable dialog box, enter the name and value of the environment variable, and choose OK.

To edit an environment variable

  1. In the Environment tab, open the context (right-click) menu for the environment variable that you want to edit, and choose Edit.

  2. In the Edit Environment Variable dialog box, edit the name and value of the environment variable, and choose OK.

To delete an environment variable

  • In the Environment tab, open the context (right-click) menu for the environment variable that you want to delete, choose Delete, and choose OK.