The Microsoft App-V Team Blog

The official blog for Microsoft Application Virtualization

Connection Groups Internals (App-V 5.0)

Connection Groups Internals (App-V 5.0)

  • Comments 9
  • Likes

written by – Yash Harsha Kumar (SDET)

Introduction

Connection Groups group one or more APP-V packages to enable member applications in these packages to interact with one another while maintaining isolation from the rest of the system. This gives sequencing engineers the flexibility to maintain packages independently and removes the redundancy of adding the same application several times onto a machine.

Connection groups can be deployed using the APP-V management/publishing servers or using the PowerShell Cmdlets on the Client machine.

Order of Packages in a Connection Group and Package Content Merge

This order determines the way in which registry and file system data of these packages are merged for the Connection Group.

Merge

Consider a Connection Group MyConnectionGroup with 2 Packages: Package1 and Package2 in that order.

Registry Merge

Consider Value “Bar” under key “HKCU\Software\Foo”.

Package1 has “Bar” with REG_SZ value data: “Package1_Data”

Package2 has “Bar” with REG_DWORD value data: 12345

The registry data for the group MyConnectionGroup will have “Bar” with REG_SZ value data: “Package1_Data” as Package1 has precedence in the merge.

File System Merge

Only fully VFS’ed files are merged for Connection Groups. These include files under Root\VFS in the package directory.

Package1 has:

Root\Foo\Foo.exe

Root\VFS\Bar\Bar.exe

Package2 has:

Root\Foo\Foo.txt

Root\VFS\Bar\Bar.txt

In this case, contents of Root\VFS will be merged, contents of Root\Foo will NOT. Hence,

- If Foo.exe were to access Foo.txt using relative path (.\Foo.txt), it would NOT find it.

- If Bar.exe were to access Bar.txt using relative path (.\Bar.txt), it would be found.

Determining the Order of Packages in a Connection Group

When enabling Connection Groups with PowerShell Cmdlets

clip_image002

In the above picture, package “Package1” has precedence over “Package2” and “Package2” has precedence over “Package3”.

When enabling Connection Groups from Server

clip_image004

In the above picture, package “App1” has precedence over “App2” and “App2” has precedence over “App3”.

Virtual Environment (VE)

Once a Connection Group is enabled, applications from the packages forming this Connection Group are launched in the Virtual Environment of the Connection Group. The VE of the Connection Group is identified by the Group ID and the Group Version ID.

Connection Group Priority

Packages can exist in multiple connection groups. The VE that an app from such a package belongs to is determined by the priority specified in the connection group descriptor document. Connection Group priority is identified by the “Priority” attribute of the “AppConnectionGroup” element in the Connection Group Descriptor document.

Launch Order

A virtual application is launched in the VE of the connection group it belongs to, even when the parent process is a virtual process belonging to a different connection group or package. When the package belongs to multiple connection groups, the app is launched in the connection group with the lower number for priority.

Example:

· App1.exe in Package App1: Writes to console

· App2.exe in Package App2: Writes to console

· App3.exe in Package App3: Writes to console

· App4.exe in Package App4: Writes to console and launch App1.exe via shortcut on desktop

· Connection Group Group1 (Priority: 1): App1, App2, App3

· Connection Group Group2 (Priority: 2): App3, App4

1. Launch App1.exe: Launches in VE of Group1

2. Launch App2.exe: Launches in VE of Group1

3. Launch App3.exe: Launches in VE of Group1

4. Launch App4.exe: Launches in VE of Group2. Child process App1.exe launches in Group1

Note: If Group1 and Group2 had the same priority, launching App3.exe would fail.

User Settings

User settings from member packages will not be propagated to Connection Groups. Similarly, once the Connection Group is disabled, user settings from the Connection Group will not be propagated to the member packages.

Example: Consider a Connection Group with Firefox, Silverlight and Adobe Flash as member packages. Add/Publish the Firefox package. Start Firefox and set www.bing.com as the homepage. Add/Publish Silverlight and Adobe Flash packages and enable a connection group containing Firefox, Silverlight and Adobe packages. When you start Firefox again, www.bing.com will not be the home page unless it was set during sequencing. Set www.Microsoft.com as the new homepage. After disabling the connection group and re-launching Firefox, the home page will be www.bing.com.

Comments
  • can you create a Connection Group consisting of 2 packages that live in separate VM's? vm1 package1, vm2 package2, different packages on different VM's in the same connection group?

  • how do packages on different VM's interact with one another? For instance, making calls to and from the Database that lives on another VM?

  • Michael,

    You cannot create connection groups with packages living on separate VMs. But applications in APP-V packages can always talk to native applications. So, if you have a database on another machine, you could always connect to it using the same APIs.

  • After reading this and couple hour testing, we i noticed following:

    BAR.EXE is depending Bar.DLL (these components must be in same dir, if not program will not start)

    Package1: Root\VFS\Bar\Bar.EXE

    Package2: Root\VFS\Bar\Bar.DLL

    (Grouping these)

    We look inside packages with command prompt and it sees both files.

    Started Bar.EXE at ahortcut and it wont start because program cannot find Bar.DLL.

    Also tried to start Bar.EXE at command prompt, and it wont start, same issue.

    If we make one package with bothfiles, it works fine.

    Tested with AppV 5.0.

  • saarja . I tried the same, without success too. Did you find a solution?

  • Folders in the VFS the are set to "Merge with Local Directory" are merged in a virtual environment as well. If this is the case the Microsoft example is wrong. Most of the time you manualy have to set this in the sequencer because by default it chooses "Override Local Directory" for most program folders. However the working dir in the AppV shortcut points to a cache location of the package it belongs to. So wrong working dir might also cause not finding your file in the other package.

  • One application having java 6_27 pre-requisite and both I have configured through connection group. the url shortcut of main application is pointing to java.exe in jre bubble and the java.exe need to interact with some of files in my main application, which couldn't be happening in the connection group, as it's searching for the same files in same java bubble. but while trying the same with native jre app, the same java.exe can able to get those files in my main application bubble. Please suggest..
    NB - both of the application sequenced in VFS only, no files are there in root(tried in root but no result).

  • One application having java 6_27 pre-requisite and both I have configured through connection group. the url shortcut of main application is pointing to java.exe in jre bubble and the java.exe need to interact with some of files in my main application, which couldn't be happening in the connection group, as it's searching for the same files in same java bubble. but while trying the same with native jre app, the same java.exe can able to get those files in my main application bubble. Please suggest..
    NB - both of the application sequenced in VFS only, no files are there in root(tried in root but no result).

  • Any update on the above issue, actually I need the working procedure of connection group as I am sure it's not merging the vfs files of both applications, as the shortcut should not search a file in a single bubble when the applications are in connection group.

Your comment has been posted.   Close
Thank you, your comment requires moderation so it may take a while to appear.   Close
Leave a Comment