Editing virtual environment variables in one go with AVE

For a long time already, Application Virtualization Explorer (AVE) has had the ability to set and edit virtualized environment variables per application basis (like you could do in the Sequencer by using that cumbersome OSD -tab), but in the recently released 2.4.0 version we decided to add support for editing variables at the package level too.

Doing environment variables individually is not really a big problem when your App-V package contains only a few virtual applications in it; after all, you go and modify variable in one and then do it for few others. Not much time wasted, right?

However, once you have a large package having number of virtual application in it, doing editing one by one becomes rather cumbersome. Mind you, the initial situation is fine as the App-V Sequencer automatically picks up new and modified environment variables from the monitoring stage, and then proceeds to add those to all virtual applications (OSDs) that get defined for that package. The issue becomes when you have to do any changes against those variables and you really – really – do not want to do sequencing wizard dance with the Sequencer (which, in 4.6 SP1, became even more convoluted for advanced sequencers when Microsoft decided to make it easier for newcomers), but rather would like to make quick point edit to the package.

Setting variables for each application individually

Up until now, the situation has been the same with both native Sequencer as well as AVE, as we only supported going into each individual virtual application and then opening up virtual environment variable editor for changes against that one application, like in the following demonstration (yes, using old version of Office, but for the sake of seeing that there are nearly 20 individual published applications for that one package):

First we go – after selecting our application – and click edit variables:

Selecting published application for environment variable editing

We add new virtualized environment variable in this case, but it would have been pretty much the same if our package actually had an existing variable we needed to make some changes to:

Environment variable editor in AVE

We can add compatibility setting to our Office application using __COMPAT_LAYER “hack” (something you could actually do even more easily in AVE by using our pre-canned configuration scripts) via environment variable:

Editing environment variable in AVE

Now we have our newly minted virtualized environment variable for Access 2003 set, which we can persist with pressing OK:

Listing variables in AVE

And now what? We have applied variable for one application, but unfortunately there’s still 18 more to go which we must do in exact same manner as the change was only for that application we had first selected:

Access with variable set Excel without any variables

Not a task one would look forward to, is it?

Setting variables for ALL virtual applications in the package

This is where new functionality in AVE 2.4 (and later) comes into play: we now have possibility to make virtual environment variable changes once and for all published applications in that package, which makes it significantly faster – as well as more reliable as you reduce possible typos during repetitive task – to quickly update large virtual application packages.

The interface for doing this is exactly the same as per application virtual environment variable editing, but only in the main Package Configuration screen this time (looking at the Package settings):

Environment variable settings link at the package level

Note that even though we already have that one virtual environment variable defined for one published application from the previous example, the number of common environment variables shown here is zero (0).

The reason for this is that when AVE looks for all the environment variables, it only counts those variables which are both set, and have an identical name in all of the OSD files. That is, if there’s same virtual environment variable in all but one OSD, it won’t be shown here at all since it’s not common to all virtual applications in the package. Only if the same variable is found in all the OSD files (regardless of the case of the naming since Windows itself doesn’t distinguish different casing in the environment variables), then it is considered by AVE to be a common variable and shown here.

Just like in the per application environment variable editor, we can now add a new common virtualized environment variable. This time, let’s use the same variable name but different value from the one we had previously for Access:

Common environment variable listing at the package level

After acknowledging our changes with OK button, AVE writes out all our common variables to all of the published applications in the package. This means that it will also override any per application variables there might be by the same name, which is evident when we quickly examine how our Access application now looks likes:

Changed variable in Access

The variable is there as before, but the value has been changed into one we set at the package, as expected.

Examining Excel application, we can see that it also has the same variable (again, as expected) set as do all the other published applications which was our intention to begin with:

Environment variable for Excel

We hope that by introducing this new feature in AVE, experience of editing big packages will be even more better as you now can “tweak” the variables quickly and conveniently from one single place, instead of needing to go and edit all published applications individually for the sake of even small change in virtualized environment variables!

, , ,

About Kalle Saunamäki

As one of the first four Microsoft App-V MVP's, Kalle has been doing application virtualization since 2003 and virtualization in general from 2000, and is a recognized in-depth technological expert in Microsoft application virtualization community.

View all posts by Kalle Saunamäki


Subscribe to our RSS feed and social profiles to receive updates.

No comments yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: