locked
App-V 5 with Excel Automation Addins and RunVirtual RRS feed

Answers

  • This article is still accurate. The pain with automation add-ins is just like he described; the fixed OPEN-keys. This is no specific App-V issue, if you repackage add-ins yourself, or get crappy vendor installs, you'll also encounter this issue. To get these OPEN-keys sorted, you'll need some additional scripting work. In case of Office, and especially Office365 C2R:

    • Set HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\ClickToRun\OverRide -> AllowJitvInAppvVirtualizedProcess DWORD=1
    • Set COM mode for all your add-ins to Integrated, OOP:True, IP:False.
    • Use a mandatory dummy package which can set RunVirtual.
    • Script a solution for automation addins.
    • Double-check you registry keys inside your app-v add-in packages and set Office related regkeys to 'merge'. (start all your Office products at least once, on your sequencer before started, so these keys get populated).

    Roy Essers

    • Marked as answer by pollewops Friday, May 1, 2020 11:13 AM
    Friday, May 1, 2020 7:25 AM

All replies

  • Although that is a new post, it looks like an old recipe for an old Excel version.

    I don't do office anymore, but I thought the plugin method changed in newer versions of Excel. Den Gough might know.


    App-V MVP & CTP Fellow. Author of AppV books: PowerShell with App-V 5, The Application Book, & Window Caching (http://www.tmurgent.com/Books)

    Wednesday, April 29, 2020 12:19 PM
    Moderator
  • This article is still accurate. The pain with automation add-ins is just like he described; the fixed OPEN-keys. This is no specific App-V issue, if you repackage add-ins yourself, or get crappy vendor installs, you'll also encounter this issue. To get these OPEN-keys sorted, you'll need some additional scripting work. In case of Office, and especially Office365 C2R:

    • Set HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\ClickToRun\OverRide -> AllowJitvInAppvVirtualizedProcess DWORD=1
    • Set COM mode for all your add-ins to Integrated, OOP:True, IP:False.
    • Use a mandatory dummy package which can set RunVirtual.
    • Script a solution for automation addins.
    • Double-check you registry keys inside your app-v add-in packages and set Office related regkeys to 'merge'. (start all your Office products at least once, on your sequencer before started, so these keys get populated).

    Roy Essers

    • Marked as answer by pollewops Friday, May 1, 2020 11:13 AM
    Friday, May 1, 2020 7:25 AM
  • I've not seen that script before, I'd try to contact the author directly about it.

    I just had a brief skim of it, and can't see that it would work well. It is disabling RunVirtual to then add the add-in via Excel's COM interface, which will set an OPEN key in HKCU outside of the bubble... Then when you start up Excel again inside the bubble you will likely have other OPEN keys overriding those local ones.

    One method I've seen in use requires cloning OPEN keys to another special registry key in the package (e.g. HKCU\Software\ExcelAddins\PackageName), and have a StartVE script scan for those and apply them back to the proper location.

    I have come up with a way to script this that doesn't require any package modifications but never implemented it:

    • Add a StartVE script to your Office add-in helper/stub package
    • Work out which package ID it belongs to by checking GUIDs of current working dir, from that find connection group it belongs to and all the group members
    • Find any open keys is each member package. You can't look in the virtual registry because of the conflicting entries overriding each other, and you can't rely on the local registry because the keys might not be fully staged before the package has been run. You can however scan registry.dat using the offline registry library dll functions (mounting a .dat file needs admin rights but this does not).
    • Also add to that list any OPEN keys found in native HKCU and also HKCU in the user data layer for the connection group
    • Remove duplicates, correct paths, compile a single ordered list and right to HKCU inside the VE



    packageology.com

    Wednesday, May 6, 2020 8:59 AM