App-V 5, SCCM 2012 SP1 and the wheels behind it all

App-V 5 has introduced some new ways to configure an application – apart from whats available in the GUI. You can see two .xml-files (apart from the report.xml) generated along with the rest of the package – in three other blog articles these were posted and given some thought. Lets ponder though – how do you deploy these using Configuration Manager 2012 SP1 CTP2 ?

Well – its easier than you imagine. Lets begin with our package!

image

As you can see – this is the new standard-output of an App-V 5 sequence. Lets keep the names – that is very important. Don’t rename any files and keep the files intact within the folder. Especially the _deploymentconfig and _userconfig. You get to select the .appv file, but the others are needed aswell. Otherwise you might get this;

image
Unable to find the specified file.

or this;

image
Imported filed, fix errors and try again.

Those are some awesome error messages, right? Try to avoid renaming files (sometimes it works anyways) or removing them from the App-V folder – its for your own good.

So we have established that the _deploymentconfig.xml and _userconfig.xml are necessary files that are actually used. We can now move forward in the wizard.

Next up is to verify our Deployment Type and in particular the Publishing-tab within our Deployment Type configuration.

image

Under Publishing we can select what applications should be available . Its not quite clear when this goes into effect. Since we have imported the _deploymentconfig.xml already – that file isn’t modified when we toggle the publishing of an application. Verifying the contents within the distribution point shows an unaltered file, whereas the file has been modified once it reaches the client.

File on the distribution point;image

File on the client;image

We can review the appenforce.log to see what takes place once a client receives the deployment.

This is the command line for adding the package;

powershell.exe -ExecutionPolicy Bypass import-module 'C:\Program Files\Microsoft Application Virtualization\Client\AppvClient\AppvClient.psd1';  Add-AppvClientPackage -Path 'C:\Windows\ccmcache\d\Mozilla Thunderbird 9.0.appv'

Applying the deployment-configuration (because this was deployed to a machine)

powershell.exe -ExecutionPolicy Bypass import-module 'C:\Program Files\Microsoft Application Virtualization\Client\AppvClient\AppvClient.psd1';  Set-AppvClientPackage -PackageID 2d9b4db6-3386-4823-8d33-07c0caa4aaf4 -VersionID 7749fb34-1764-4f61-9161-3d0061bd8268  -DynamicDeploymentConfiguration 'C:\Windows\CCM\SystemTemp\AppVTempData\2d9b4db6-3386-4823-8d33-07c0caa4aaf4_DeployConfig.xml'

Publishing it for the users – since its deployed to a machine the –Global is used.

powershell.exe -ExecutionPolicy Bypass import-module 'C:\Program Files\Microsoft Application Virtualization\Client\AppvClient\AppvClient.psd1';  Publish-AppvClientPackage -PackageID 2d9b4db6-3386-4823-8d33-07c0caa4aaf4 -VersionID 7749fb34-1764-4f61-9161-3d0061bd8268 –Global

As you can see – C:\Windows\CCM\SystemTemp\AppVTempData is a temporary working folder for the SCCM-client to store these configuration files for when they are needed. The files can be reviewed in clear text and gives a chance to see what is actually deployed. Mozilla Thunderbird was deployed successfully (according to SCCM), but no application is visible. Since we can verify the configuration file used – we can see that the application was disabled entirely. This could either be done by the configuration-file we imported or through the GUI within SCCM.

What happens if we alter a configuration file after we have imported it? We can easily choose to create a new Deployment Type and reimport the package;

image

Since we reimport the package – the configuration files will be re-read and available for deployment. Since the distribution point now only stores a file once – we don’t need to worry about how many times we import a specific package (as long as the files are the same). We could have 5, 20 maybe even 100’s of Mozilla Thunderbird – all tailored for different needs within our configuration files!

App-V 5 standalone and Connection Groups

App-V 5 standalone has become a lot easier to deploy as of the new release – we don’t need to configure the client in any particular way and any package can be deployed using an MSI generated automatically by the sequencer. There are certain topics that still need some configuration – Connection Groups is one of them. Lets get started!

Connection Groups allow for virtual applications to interact with each other – it’s the version 2.0 of the Dynamic Suite Composition (DSC). DSC had some major flaws that made its practical use limited and often caused complex scenarios that required extensive troubleshooting. Connection Groups so far looks a lot more improved and hopefully it can be more easy to manage. Within the App-V Server or the SCCM 2012 SP1 there are easy to use ways to administrate these connection groups and deploy – SCCM was previously discussed here.

Since App-V 5 is administrated via powershell and therefore we need to look into the requirements for setting up a Connection Group. I’ll assume that you have installed the App-V client and imported its powershell module. First – we need to define an XML-file that sets the order of the application packages.

<?xml version="1.0" encoding="UTF-8"?>
<AppConnectionGroup AppConnectionGroupId="8601afe3-b565-3143-8ae1-e4f5bba61dcc" VersionId="0ff7a09e-8ed2-654d-80b5-f252ca9037d3" Priority="0" DisplayName="Freemind" xmlns="http://schemas.microsoft.com/appv/2010/virtualapplicationconnectiongroup">
<Packages>
<Package PackageId="5955a77b-b40f-4c1a-a9a4-b798591e8524" VersionId="8946295f-751e-4b4d-a887-eda103bb88f2">
</Package>
<Package PackageId="ea883402-3266-43ff-b4bc-a3bf0ad1905b" VersionId="3abd54ec-6055-43c1-95c5-11a827c6c992">
</Package>
</Packages>
</AppConnectionGroup>

Lets go through the XML-file

AppConnectionGrouId needs to be a unique identifier for Connection Group. In case you are out of imagination in creating one – you can run the following powershlle-command to get one;

 [guid]::NewGuid() 

This is the output;

image

You can repeat the same for VersionID – which needs to be updated for each version of the Connection Group.

DisplayName can be anything – SCCM sets a unique ID that it keeps track of. Since we are doing this manually – an easy to understand name might be good.

The next section is AppV Packages. You will need to know the PackageID and the VersionID from the packages you are connecting. This information can be retrieved by running the powershell command Get-AppVClientPackages

image

Once we have created the file – named freemind.xml in this case, we can actually go by setting up the connection group. The below one-liner will add the Connection Group and publish the Connection Group globally (for all users that is).

Add-AppvClientConnectionGroup -Path 'c:\media\freemind.xml' | Enable-AppvClientConnectionGroup –Global

If you want to disable a Connection Group –  you can use the name you set to easily locate it and disable the Connection Group.

 Get-AppvClientConnectionGroup -name freemind | Disable-AppvClientConnectionGroup

App-V 5, SCCM 2012 SP1 and Connection Groups

Since we have so many new releases coming up – it was time to set how well they co-exist. App-V 5 Beta 2 is out and inorder to support that in a SCCM 2012 environment – we need SCCM 2012 SP1 deployed into the environment. Once that happens – some new options are available that we will browse through.

When creating a new application  – we have the option of two different Application Virtualization applications. One is the legacy-format of App-V 4.6, and now App-V 5 is also available as a choice.

image

The wizard is pretty easy – you select the .appv-file created during your packaging efforts and the application will be imported into the environment. If you verify the properties of the deployment type – you can see a new tab;

image

Virtual Environments can be setup within the newly available node App-V Virtual Environments just below the rest of the nodes in Application Management.

image

Creating a new Virtual Environment might seem scary, however it simply is the new version of what was previously called Dynamic Suite Composition. From an App-V perspective – its called Connection Groups. Where the name Virtual Environment comes from seems odd – but we are just creating Connection Groups in the end.

image

Each connection-group needs a name, a name that only seems to be visible through SCCM-console. Reviewing later on whats deployed on the client – the name does not appear anywhere. Next step is to start adding applications to the Connection Group.

image

You can only see App-V 5 applications listed, keeping adding them one at a time…

image

It does matter in which order you add them – however only from the usage of the application. SCCM will not deploy any applications automatically part of a Connection Group, you need to make any virtual applications deployed on their own or as part of a dependency. Once a Virtual Environment (aka Connection Group) is created – if all the applications are available on a client – the Connection Group will be created through a series of Powershell commands.

image

image

The client actually executes the following commands to ensure that the Connection Group is created;

powershell.exe -ExecutionPolicy Bypass import-module 'C:\Program Files\Microsoft Application Virtualization\Client\AppvClient\AppvClient.psd1'; Add-AppvClientConnectionGroup -Path 'C:\Windows\CCM\SystemTemp\AppVTempData\ConnectionGroup_609C8E91-7A45-49D8-85EF-6F97393F6AD7.xml'
powershell.exe -ExecutionPolicy Bypass import-module 'C:\Program Files\Microsoft Application Virtualization\Client\AppvClient\AppvClient.psd1'; Enable-AppvClientConnectionGroup -GroupId 609C8E91-7A45-49D8-85EF-6F97393F6AD7 -VersionId 11998038-9881-4E71-AE3F-05B8CC736CF8  -Global

As you can see – there is a XML-file referenced. This file contains the configuration of the group;

<appv:AppConnectionGroup xmlns:appv="http://schemas.microsoft.com/appv/2010/virtualapplicationconnectiongroup" AppConnectionGroupId="609C8E91-7A45-49D8-85EF-6F97393F6AD7"
VersionId="11998038-9881-4E71-AE3F-05B8CC736CF8" IgnorableNamespaces="" DisplayName="ScopeId_2C452F22-4D7F-4190-B8A7-296878D46822/VirtualEnvironment_377202b9-16f7-465a-831d-60e20961c0a1">
<appv:Packages>
<appv:Package PackageId="52493623-312b-4187-9d0f-505d4b8cb791" VersionId="d23059ee-91ec-466b-a115-9157b4be0604"/>
<appv:Package PackageId="6d099036-5110-49bc-a2b9-c6d954bad70e" VersionId="af0d1d10-e5cc-47b4-8659-920a70acefab"/>
</appv:Packages>
</appv:AppConnectionGroup>

App-V 5 and Office 2013 Preview packages

To be able to import the Office 2013 Preview Packages that can be downloaded – you need the following;

1. App-V 5 beta 2 client

2. Scripts needs to be enabled for the import to occur. To enable this and then import – run the following Powershell commands;

Set-ExecutionPolicy RemoteSigned
Import-Module AppvClient
Set-AppVClientConfiguration -EnablePackageScripts 1
Add-AppvClientPackage 'C:\media\ProPlusVolume_VisioProVolume_ProjectProVolume_en-us_x86.appv' | Publish-AppvClientPackage -Global

Obviously – you need to alter the path to where the package is located.

Virtual Application Extensions and the future

App-V 5 is in the loop and this time around Microsoft has greatly revamped the architecture on how the virtualization part of App-V will be implemented. However, inorder to understand the tremendous advantage we will have with the new architecture – lets look at previous problems of Application Virtualization.

Softgrid and what became Microsoft Application VIrtualization was a great product that made deploying applications very simple and removed a large portion of why application deployments were scary. As opposed to deploying an application in its traditional sense – melting it together with the operating system and all its other application – we gained the possibility of providing a virtualized layer on top of the operating system. This layer provided two main components which removed the threat of breaking other applications or the operating system – virtualization and isolation. By allowing only a specific agent (aka sfttray) to spin up the virtual environment we created a nice line of defense that would ensure our computers integrity and allow the application to utilize local system resources.

The downside of the coin was that if only a single agent could access our virtual environment – we have also isolated the resources within that virtual environment and any type of call into that environment need to pass through our single guardian. The main problem with this was that sfttray (our guard) only allowed certain things to pass through by default, and as Windows and applications came up with new ways of integrating with applications – those “defaults” soon became to few and eventually altered the user experience of an application. For quite some time there haven’t been any technical limitation to virtualize just about any application, but the client that was delivering those applications proved to be very limited in allowing users to interact with the applications seamlessly. Sfttray supported file type associations and shortcuts. Simply not good enough if you are supporting todays demanding end-users.

App-V 5 will change this paradigm and provide an architecture that can ensure future abilities will be extended with much less effort – if any effort is necessary. As opposed to passing through a guard – we will not be limited to accessing it via an agent instead we can now gain access directly and only virtualizing it. Sfttray is history – and so is the Q: – drive. Lets poke around at a virtual application to understand why this architecture makes such a difference.

Meet the shortcut. A shortcut was supported in App-V 4, however the command-line in the shortcut always referenced sfttray.exe and then invoking your virtual application. Say hello to App-V 5 type of shortcut;

image

As you can see – we are now directly calling vlc.exe. It seems to be placed directly onto our filesystem – infact it is!

image

Directly under C:\Programdata – our packages are now placed in the native filesystem. As you can see we also have another improvement which is not even mentioned – the previous requirement of a unique 8.3-compliant name is gone. Instead all packages are executed under their unique (very long) GUID – to allow us to focus more on application packaging and less on naming conventions.

App-V 4 also supported file type associations – which are still there. With an improved experience!

image

This is a wmv-file – associated to our virtualized instance of App-V. Lets say we want to set another file type to be associated with our virtualized VLC. Previously we had to go through sfttray – but that’s gone…

image

VLC is now presented as any other program. Previously we had to retrain our users to select sfttray (here also presented as we allow the App-V 4.6 SP2 and App-V 5 to co-exist on the same system) and then select their program. Now – a native experience is given to the end-user and they can select the application that they want start a file type association with.

This all seems great that the experience with existing extensions (anyone who has been forced to listen to me knows that I call these entry points – but from now on I will favor extensions) – lets see what new stuff is out there. Right-clicking a file type will bring context-menus;

image

If the user is more familiar with altering a file type association through the Default Programs from within the Control Panel – VLC will also be presented here as a regular application;

image

We can see all the file type associations that our virtualized VLC currently is set to be the default application to handle;

image

However, if we insert a DVD – that’s not a file-type association is it? Well – how external media (DVDs for example) are started or at least what options are presented to the end-user is defined from Autoplay in the Control Panel. Yet again – we can see the virtualized VLC showing up as the end-user would expect it to;

image

All of these interactions were previously not available (still possible through manual labor and tweaking in the registry) – now we get them out of the box from a virtualized application! To move further – Spotify will be used to demonstrate even more interaction! When creating a package – a couple of files are created. The content is .appv, the installer in a standalone mode is the .msi – but we also have two configuration files – named Deployment and User config. If reviewing Deployment-config for our Spotify package – we can see the following;

image

This looks awesome – as Spotify has its own protocol handler which allows users to click a link and directly open a playlist within Spotify.

image

This are all visible extensions for the end-user and will make the gap of the experience between a virtual application and a natively installed application even smaller. However, the App-V team didn’t stop here and made even more possible extensions beyond of what we were expecting.

There are two methods that are used under the hood of everything – that provides a greater interaction between applications and allows for seamless exchange of data between applications. Quite often – we admins had to find out the hard way that this “report” for application X actually depend on beeing able to locate Excel, Adobe Acrobat or some other program. Many ways are used to send to the proper data to this “other” program – quite a few articles to resolve problems regarding this inter-application communication problems are written by me personally and even more questions are asked in the forums. We know about them – but what are they really?

AppPaths are one way – its an easy way to locate a needed .EXE if the application has registered itself.  If reading the article – it allows for quite a few different ways to use this feature, however – we most commonly deal with it because a program calls an application (say excel.exe) by simply asking for excel.exe – and not a full path. When registered properly – apppaths will allow us to start our specific version that we currently have installed. Filling in the full-path to the executable in question.

If our application is virtualized (excel.exe for example) – it will not be registered at all and the main application will simply state that you need this application installed. Fortunately – App-V 5 will now allow applications to register themselves properly and there be found by any application (virtualized or not) requesting them!

image

The other alternative are is COM. COM has been around since 1993. COM is something that has been and still is beyond me. Usually – when you realize that an obscure error message is given when the program attempts to send data to an external program COM is related. Wikipedia has a great article which clarifies it to some extent in what ways we are dealing with COM. OLE, OLE Automation, ActiveX, COM+ and DCOM are the more commonly used words.

Here is an example of a COM that was detected by the sequencer;

image

Wow – so we have just learned that App-V 5 will bring in many new ways that will improve the application experience and make previous scenarios that seemed impossible suddenly appear simple and work right out of the box.

App-V and .appv

So, you created a package and wanted to discover what was in it. One way to peak inside of a package – is to simply rename the binary-file from .appv to .zip.

Is it supported? Probably not

What happens if you do it?

You can see the contents;

image

If you copy the registry.dat file outside and open regedit and choose the following menu;

image

Select the file and name the hive (something that makes sense) – you will then see the following;

image

The hive in question is HKEY_LOCAL_MACHINE and APPV (which is what was chosen as name).

What does this mean? Well… You can see the files and the registry parts of a package. But is this supported? Lets divide it into a few different parts;

1. Make a copy of the package – rename it to .zip and mount the .DAT-file into the registry. Seems OK

2. Rename the original file to .zip and then rename it back to .appv.
Seems unlikely to be ok

3. Rename the original file to .zip, make changes to the registry and / or file-structure and then rename it back to .appv
Seems likely to be your-way-out-of-support-scenario

4. Does it seem like a lot more work then Application Virtualization Explorer?
YES!

App-V 5 and OS integration

One of the new features that App-V 5 brings to the table is the possibility to more seamlessly integrate to the operating system. But, what does that mean in practice?

Well, if you sequence Mozilla Thunderbird – the following things show up…

Protocol Handlers;

image

Default Program Handlers;

image

This means that if you click a link like this;

image

A new mail will be presented;

image

(guessing that the empty subject / to-field relates to beta-code Smile )

If you sequence InstEd – more things will be available on the right-click of MSI-files that previously wasn’t there see the Instead It! menu-option)

image

Of course there are many more features to come – but Application Virtualization just took a major step forward in bringing a native application experience.

App-V 5 beta–Other blog posts

Not excited enough yet? Some other people have written about it aswell – continue reading!
Introducing User Experience Virtualization (UE-V) and App-V 5.0

App-V 5.0 Beta released, what’s new/different?

Beta for App-V 5.0

Breaking into the new APP-V 5.0 APPV format

App-V 5.0 Beta: What happened to the OSDs?

App-V 5.0 Beta: The End of CSIDLs

APP-V 5.0 Beta Sequencing Review

APP-V 5.0 Client at a Glimpse

App-V 5.0 officially announced (with beta!)

Migrating packages from App-V 4.x to App-V 5.0

AppV 5.0: The 10GB Package

Don’t let App-V 5.0 derail your migration project: A strategic assessment of the impact of App-V 5.0 on your migration project

App-V 5.0 Beta, out now.

App-V 5.0: Add publishing server.

App-V 5.0: Where did my logs go?

App-V 5 Beta and Shortcuts – the case of the missing (& added) arguments

App-v beta 5

Powershell: Get command definition

App-V 5.0 der Knoten ist geplatzt

App-V 5.0 und UE-V Public Beta ist gestartet

Microsoft updates desktop virtualization line-up with App-V 5, User Experience Virtualization

App-v beta 5

Thought on App-V 5.0 Beta: Don’t stop your Windows 7 Migration

App-V 5.0 Sequencer – Sequencen und das Ergebnis

App-V 5.0 Beta veröffentlicht

Howto: Increase the Update Speed for Application Changes

Use App-V 5 Beta Publishing and Management Server with a Remote Database

TechNet Virtual Lab: MDOP: Microsoft Application Virtualization (App-V) 5.0 Overview

App-V 5 Beta Component Communication Overview

Updated Microsoft App-V File Specification

Walking through the App-V 5.0 Beta Server Setup (Part 1)

App-V 5 Beta Basic Troubleshooting

App-V 5.0 (Beta1) Shortcut Editing Tricks

App-V version 5.0 Beta

Just a preview

Application Virtualization 5.0 Beta Tutorial – Part 1

Technodge eBooks

Application Virtualization 5.0 Beta Tutorial – Part 2

Problems App-V Server 5.0 Beta

Application Virtualization 5.0 Beta Tutorial – Part 3

Working on Part 4 and 5 of the App-V 5.0 Beta series

Application Virtualization 5.0 Beta Tutorial – Part 4

App-V 5.0 Beta Server Install Tutorial – Part 5 (Final)

APP-V 5.0 Beta: The operation failed as the management server was not found.

Windows Reimagined – Where does App-V fit in – Part 2 ?

App-V 5 beta–features

Here comes a low-down of what we hope to expect!

Rewritten architecture to support the following;
Higher level of integration with the operating system and other applications, support things like;
Shortcuts
File Type Associations
Protocol Handlers
AppPaths
JumpLists
Com-objects

Not yet verified; Integration with default application handlers?
Shell Extensions?

A “working” shared cache-mode – easy to setup, easy to maintain – one-click and you are good to go!
Granular configuration of package – provide different users with different configurations
Per-machine configuration possibilities
Increased scripting possibilities to allow per-machine and per-user scripting
Easy to install client and to configure client (that has been a major problem)
Side-by-side migration from previous version of App-V
Converter of packages to support the new format of App-V
New openly available format – just rename it to .ZIP to view the contents
Powershell-support to administrate the entire environment
Connection Groups – DSC, however working!

The server
Its still alive? Apparently. Sighs… Apparently people like this. Well – it can´t be anything worse than what the previous one was. Does it distribute all types of packages (MSI, scripts, customer installers, virtualized applications)? No
Do I want it then? No
Sorry – I am not to excited about this part

What did they drop?
Windows XP support