written by – Yash Harsha Kumar (SDET)
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.
Consider a Connection Group MyConnectionGroup with 2 Packages: Package1 and Package2 in that order.
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.
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
In the above picture, package “Package1” has precedence over “Package2” and “Package2” has precedence over “Package3”.
When enabling Connection Groups from Server
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.
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.
· 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 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.