Unorthodox configuration: How to use VLK and Click-to-run Office Apps side-by-side (Visio and Office 2016 as an example)

This post was most recently updated on July 28th, 2022.

4 min read.

Ever had issues with different versions of Office programs not living in harmony together? Me too! This post describes how I was able to fix the issue and get Visio and Office 2016 of different installation types to play well together.

Preface

This blog post was inspired by my need to have Office 365 ProPlus (2016 versions) and Visio running side-by-side on my laptop. That turned out to be a lot more complicated than it arguably should be, so I documented the steps for further use. These instructions are written for that particular scenario (installing MS Visio on a machine with pre-existing Office 2016/365 ProPlus installation). My laptop is running Windows 10 Enterprise, which probably caused one of the issues I ran into.

Let’s get started! 

Steps

You can get a rough outline of the steps here. Being Microsoft’s documentation, it doesn’t really tell you what to do, though.

Time needed: 30 minutes

How to use VLK and Click-to-run Office Apps side-by-side

  1. Office Deployment Tool

    First of all, download the Office Deployment Tool, which then enables you to download and package a Click-to-run version of Visio installer. If you have Office 2016 installed already, you’ll need to use the 2013 installer for Visio. You can download the 2016 version of the Office Deployment Tool here, or the 2013 version here. Unpack it to a safe directory somewhere.

  2. Using the tool to create an App-V -package

    Next, you’ll need to exit the configuration file (configuration.xml). Open it, and make it look something like this:

    <Configuration>
    <Add OfficeClientEdition="32">
    <Product ID="<YourWantedProductIdHere>">
    <Language ID="en-us" />
    </Product>
    </Add>
    </Configuration>


    Save and close it. (You can find more of the Product ID:s here.)

    Next, you’ll need to run the tool. Open a command line, cd to the directory where you have setup.exe, and run it. You’ll get help with the tool:

    Usage:
    SETUP mode [path to configuration file]
    SETUP /download [path to configuration file]
    SETUP /configure [path to configuration file]
    SETUP /packager [path to configuration file] [output path]
    SETUP /help [path to configuration file]
    /download Downloads files to create an Office15 installation source
    /configure Adds, removes, or configures an Office15 installation
    /packager Produces an Office App-V package from an Office installation source
    /help - Prints this message

    Run the following commands (change <yourpath> to be the path you downloaded the tool too):

    setup.exe /download "<yourpath>/configuration.xml"
    setup.exe /packager "<yourpath>/configuration.xml" "<yourpath>/output"

    As a result, after a packaging process that seems to take forever, you’ll get an AppV -package for MS Visio. It’s located in the <yourpath>/output/AppVPackages -folder, which also has UserConfig.xml and DeploymentConfig.xml -files for your chosen build.

  3. Deploying the App-V -package

    “The heck am I going to do with this steamy bile of nonsense?”, you might ask. So did I, as double-clicking that bugger doesn’t do you any good. However, quick googling took me to an instructions document, that told me to run some PowerShell-magic to get the package to install.

    $pkg = Add-AppVClientPackage <yourpath>\output\AppVPackages\MyApp.appv
    Publish-AppVClientPackage $pkg –DynamicUserConfigurationPath <yourpath>\output\AppVPackages\UserConfig.xml


    That’s all swell, except even the first cmdlet refused to work for me. I got the following error:

    Add-AppVClientPackage : CoCreateInstance() failed. The Microsoft Application Virtualization Service may not have been started. Please verify that the service is running.
    At line:1 char:9


    It’s possible, that I got the error because of how I’ve configured my environment. It might work for you just fine. In case it doesn’t, below are some steps on how to possibly remediate the issue.

    If this does not work then continue to the next step

  4. Fixing the issues stopping the deployment

    Oh! Well, that must be an easy fix. There’s a service with roughly that name, and it’s disabled. Just start the service, then it’ll work fine, right?

    AppV Service Shenanigans
    AppV Service Shenanigans

    In reality, trying to Start the service, you get an error. The one below, or similar. It might be dependent on your environment.

    AppV Service Start error
    AppV Service Start error
    To get around this, you actually don’t need to touch the service at all. As a matter of fact, the fix doesn’t touch the service at all, at least not directly.

    Pop the PowerShell open again and run these:

    PS C:\WINDOWS\system32> Import-Module Appvclient
    PS C:\WINDOWS\system32> enable-appv
    App-V was successfully enabled.


    This should enable App-V client for you. Now you can actually try installing and publishing the App-V -package.

    PS C:\WINDOWS\system32> $appv = Add-AppVClientPackage -Path "<yourpath>\output\AppVPackages\VisioProRetail_en-us_x86.appv"

    This might fail with an error like this:

    Add-AppVClientPackage : Operation failed. This package has an embedded script defined and set to 'rollback on error' which is incompatible with this client's setting to disable embedded script execution. Please either enable embedded scri pting for this client, or modify the script definition for this package to set 'rollback on error' to false.
    Operation attempted: Configure AppV Package.
    AppV Error Code: 100000000D.
    Please consult AppV Client Event Log for more details.

    If it does, you’ll need to make a small registry change. Run regedit and navigate to this:

    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\AppV\Client\Scripting

    Then you should enable (set value to 1) for EnablePackageScripts.
    Regedit to enable appv scripts

    Regedit to enable appv scripts

    Now we should be good!

    If not, see the below step

  5. Retry the App-V -package installation

    Finally, running this should work now:

    PS C:\WINDOWS\system32> $appv = Add-AppVClientPackage -Path "<yourpath>\output\AppVPackages\VisioProRetail_en-us_x86.appv" PS C:\WINDOWS\system32> Publish-AppVClientPackage $appv –DynamicUserConfigurationPath "<yourpath>\output\AppVPackages\VisioProRetail_en-us_x86_UserConfig.xml"

    After a while, you should have Visio installed. Easy as pie!

References

mm
4 1 vote
Article Rating
Subscribe
Notify of
guest

0 Comments
Inline Feedbacks
View all comments