«

»

Jul 31 2013

Print this Post

Using connection groups to interact locally installed applications with virtual applications

image_pdfimage_print

Let’s take the following scnenario: both Microsoft Visio 2010 and Microsoft Project 2010 have been virtualized using Application Virtualization v5.0 techniques. Microsoft Word 2010 has been installed locally. With Microsoft Application Virtualization prior to v5.0 it was not possible to use a virtualized application within a locally installed one. Unless you started the locally installed application within the same bubble as the virtualized application… Too much of a hassle.

In this example I will demonstrate how to use virtualized applications within a locally installed one.

Preparation: sequencing

  • Create a sequencing machine with Word 2010.
  • Start Word so there will be no more MSI Self Repairs
  • Install AppV 5.0 sequencer
  • Sequence both Visio 2010 and Project 2010.
    Make sure that the machine is reverted to a clean state before sequencing the second application.

Actions on the client

  • Make sure that the Application Virtualization Client 5.0 has been installed.
  • Start Powershell (x64) as an administator.
    Enter the command:

    1
    
    Set-ExecutionPolicy -ExecutionPolicy Unrestricted
    Set-ExecutionPolicy -ExecutionPolicy Unrestricted

    Set-ExecutionPolicy -ExecutionPolicy Unrestricted

    Press ‘y’ to continue

  • Enter the command:
    1
    
    Import-Module AppVClient

    Import-Module AppVClient

    Import-Module AppVClient

  • Add the virtualized Project 2010 with the command:
    1
    
    Add-AppVClientPackage -Path "C:\AppV50\Microsoft_Project-AppV50_2010STD_MLI\Microsoft_Project-AppV50_2010STD_MLI_2.appv" | Publish-AppVClientPackage -Global
    Add-AppVClientPackage -Path "C:\AppV50\Microsoft_Project-AppV50_2010STD_MLI\Microsoft_Project-AppV50_2010STD_MLI_2.appv" | Publish-AppVClientPackage -Global

    Add-AppVClientPackage -Path “C:\AppV50\Microsoft_Project-AppV50_2010STD_MLI\Microsoft_Project-AppV50_2010STD_MLI_2.appv” | Publish-AppVClientPackage -Global

    Add-AppVClientPackage -Path "C:\AppV50\Microsoft_Project-AppV50_2010STD_MLI\Microsoft_Project-AppV50_2010STD_MLI_2.appv" | Publish-AppVClientPackage -Global  (Done)

    Add-AppVClientPackage -Path “C:\AppV50\Microsoft_Project-AppV50_2010STD_MLI\Microsoft_Project-AppV50_2010STD_MLI_2.appv” | Publish-AppVClientPackage -Global (Done)

  • Add the virtualized Visio 2010 with the command:
    1
    
    Add-AppVClientPackage -Path "C:\AppV50\Microsoft_Visio-AppV50_2010STD_MLI\Microsoft_Visio-AppV50_2010STD_MLI_2_3.appv" | Publish-AppVClientPackage -Global

    Add-AppVClientPackage -Path "C:\AppV50\Microsoft_Visio-AppV50_2010STD_MLI\Microsoft_Visio-AppV50_2010STD_MLI_2_3.appv" | Publish-AppVClientPackage -Global

    Add-AppVClientPackage -Path “C:\AppV50\Microsoft_Visio-AppV50_2010STD_MLI\Microsoft_Visio-AppV50_2010STD_MLI_2_3.appv” | Publish-AppVClientPackage -Global

  • You will also find the results in the Event Viewer:

    Eventviewer

    Eventviewer

  • If you start the locally installed Word, you will not see the virtualized Visio 2010 and Project 2010:

    No Visio 2010 and Project 2010 in Word 2010.

    No Visio 2010 and Project 2010 in Word 2010.

  • To enable interaction between the locally installed application and the virtualized application the registry needs to be modified:
  • Start regedit and go to HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\AppV\Client\RunVirtual
  • Create the key ‘winword’.
  • Under the (Default) value, add both the PackageID and VerionId of Visio. There is an underscore between the PackageId and VersionId.

    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\AppV\Client\RunVirtual

    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\AppV\Client\RunVirtual

  • Use the following command to find both the PackageId and VersionId:
    1
    
    Get-AppVClientPackage -Name *Visio*

    Get-AppVClientPackage -Name *Visio*

    Get-AppVClientPackage -Name *Visio*

  • If Word 2010 is started, then go to ‘Insert’ and select ‘Object’ from the ribbon. Then you have the option to include a Visio 2010 drawing:

    Virtualized Visio 2010 within locally installed Word 2010.

    Virtualized Visio 2010 within locally installed Word 2010.

  • An example:

    An example.

    An example.

Actions on the client: create the connection group.
Now only Visio 2010 is made available on the locally installed Word 2010. To include Project 2010, a connection group has to be used.

  • Create the connection group XML File ‘ProjectandVisio.xml’.
    1
    2
    3
    4
    5
    6
    7
    
    <?xml version="1.0" encoding="UTF-8"?>
    <AppConnectionGroup xmlns="http://schemas.microsoft.com/appv/2010/virtualapplicationconnectiongroup" AppConnectionGroupId="d355eea5-4a2a-407c-89b4-15bb5cfc175e" VersionId="515a059c-6cda-47fb-8048-581383b42b7a" Priority="1" DisplayName="Project and Visio">
       <Packages>
         <Package PackageId="ad9f87ea-1547-4b63-b82e-e5248b01884c" VersionId="4e192f99-8380-4595-be43-fc36456ae74e"></Package>
         <Package PackageId="31591288-d3fb-4bc2-8beb-c7f72c6895eb" VersionId="1117d8c5-e7c9-4c0b-8fae-6628a4e99620"></Package>
       </Packages>
    </AppConnectionGroup>
  • The AppConnectionGroupId and VersionId have been created with the command:
    1
    
    [Guid]::NewGuid()

    [Guid]::NewGuid()

    [Guid]::NewGuid()

  • The PackageId and VersionId have been found with the command:
    1
    
    Get-AppVClientPackage -Name *Microsoft*
    Get-AppVClientPackage -Name *Microsoft*

    Get-AppVClientPackage -Name *Microsoft*

    The PackageId and VerionId have been marked.

  • To enable the connectiongroup run the command:
    1
    
    Add-AppvClientConnectionGroup -Path "C:\AppV50\ProjAndVisio.xml" | Enable-AppVClientConnectionGroup -Global

    Add-AppvClientConnectionGroup -Path "C:\AppV50\ProjAndVisio.xml" | Enable-AppVClientConnectionGroup -Global

    Add-AppvClientConnectionGroup -Path “C:\AppV50\ProjAndVisio.xml” | Enable-AppVClientConnectionGroup -Global

  • Also check the event viewer:

    Check the event viewer.

    Check the event viewer.

  • If you start the locally installed Word 2010, you will see both Project 2010 and Visio 2010:

    Virtualized Project 2010 and Visio 2010 in a locally installed Word 2010.

    Virtualized Project 2010 and Visio 2010 in a locally installed Word 2010.

  • This happens if a Project 2010 document is added:

    Project 2010 document.

    Project 2010 document.

  • If you see this warning please wait a short while and try again:

    Warning.

    Warning.

Cleaning up.

First remove the connection group:

  • Run the command:
    1
    
    Get-AppVClientConnectionGroup | Remove-AppVClientConnectionGroup

    Then all the connection groups are removed.

    Get-AppVClientConnectionGroup | Remove-AppVClientConnectionGroup

    Get-AppVClientConnectionGroup | Remove-AppVClientConnectionGroup

  • And check the event viewer for the results:

    Event Viewer - Remove ConnectionGroup

    Event Viewer – Remove ConnectionGroup

Remove the virtual Microsoft applications
remove all the Microsoft applications. As only visio 2010 and Project 2010 have been added as a virtual Microsoft application, a wildcard can be used.

  • Run the command:
    1
    
    Get-AppVClientPackage -Name *Microsoft* | Remove-AppVClientPackage

    Get-AppVClientPackage -Name *Microsoft* | Remove-AppVClientPackage

    Get-AppVClientPackage -Name *Microsoft* | Remove-AppVClientPackage

Known errors

  • Error:
    Add-AppvClientConnectionGroup : Application Virtualization Service failed to  complete requested operation.  Operation attempted: Add AppV Connection Group.  AppV Error Code: 0600000008.  Error module: Catalog. Internal error detail: 8A90160600000008.  Please consult AppV Client Event Log for more details.

    Add-AppvClientConnectionGroup : Application Virtualization Service failed to
    complete requested operation.
    Operation attempted: Add AppV Connection Group.
    AppV Error Code: 0600000008.
    Error module: Catalog. Internal error detail: 8A90160600000008.
    Please consult AppV Client Event Log for more details.

    Event Viewer

    Event Viewer

    In this case the connection group is installled, but one of the packages mentioned in the connection group XML File has not been added on the client.

  • In the runvirtual registry key it has no sense to add the AppConnectionGroupId and VersionId of the connection group XML file. It is completely ignored. Just add one of the PackageID / VersionId of one of the virtual applicatoins mentioned in the connection group XML file.

Example: linked objects in Excel

As an example both Visio 2010 and Project 2010 will be made available in a locally installed Excel 2010. A Visio 2010 object and a Project 2010 object will be inserted into Excel 2010.

  • Allow the locally installed Excel 2010 to run in a virtual environment:
    • Start regedit and go to HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\AppV\Client\RunVirtual
    • Create the key ‘excel.exe’.
    • Under the (Default) value, add both the PackageID and VersionID of Visio. There is a underscore between both the PackageID and VersionID.

    Allow the locally installed Excel 2010 to run in a virtual environment

    Allow the locally installed Excel 2010 to run in a virtual environment

  • Create a Visio 2010 object in Excel 2010:
    • Start Excel and go to ‘Insert’and select ‘Object’ from the ribbon.
    • Select Visio Drawing from the list.
    Create a Visio 2010 object in Excel 2010.

    Create a Visio 2010 object in Excel 2010.

    • Click [Ok]
    Visio 2010: Change drawing type.

    Visio 2010: Change drawing type.

    • Click [Ok].
  • Drag and drog some figures in Visio.
    Drag and drop some figures in Visio 2010.

    Drag and drop some figures in Visio 2010.

  • When ready click somewhere in the Excel sheet.
    When ready click somehwere in the sheet.

    When ready click somehwere in the sheet.

  • Do the same but then for Project.
    Insert Project 2010 object  in Excel.

    Insert Project 2010 object in Excel.

  • Dubble click on the Visio object. It is opened with Visio.
    Dubble click on the Visio 2010 object.

    Dubble click on the Visio 2010 object.


    Save the Excel sheet and quit Excel.
  • Remove the locally installed Excel 2010 to run in a virtual environment:Use regedit to modify (Default) for Excel: just put an underscore in front of the data.
    Disallow the locally installed Excel 2010 to run in a virtual environment

    Disallow the locally installed Excel 2010 to run in a virtual environment

  • Start Excel and open the saved sheet.
    Click on the visio 2010 object.
    Now there is a failure: “Cannot start the source application for this object.”

    Now there is a failure: “Cannot start the source application for this object.”


    Click [Ok].
    Now there is a failure: “Cannot start the source application for this object.”
  • The same when there is a double click on the Project object.
    Project 2010: Now there is a failure: “Cannot start the source application for this object.”

    Project 2010: Now there is a failure: “Cannot start the source application for this object.”


    Quit Excel without saving the sheet.
  • Allow the locally installed Excel 2010 to run in a virtual environment by removing the underscore.
    Allow the locally installed Excel 2010 to run in a virtual environment

    Allow the locally installed Excel 2010 to run in a virtual environment

  • And the Visio 2010 object works again.
    Visio 2010 works again.

    Visio 2010 works again.

More information

Permanent link to this article: https://www.vroom.cc/wordpress/using-connectiongroups-to-interact-locally-installed-applications-with-virtual-applications/