Office 365, App-V and Windows 10 – 1607

Oh, the joy of reusing technology. Office 365 leverages the App-V technology, however slightly modified and primarily used as a delivery method with no isolation. App-V in comparision is used more for its isolation and to be honest – not so much for its delivery mechanism.

In addition – since Windows 10 – 1607 the App-V client is now a Windows Feature.

Now, for fun – lets try these steps;

  1. Install Windows 10 – 1607
  2. Install any version of Office 365 ProPlus

Find a Visio drawing and open it. Most likely it will be opened with the Visio Viewer – which is a component part of Office 365 ProPlus. Visio Viewer is just an ActiveX component and will therefore load the drawing inside Internet Explorer 11.

image

let’s add a third-step to this process….

3. Open an elevated Powershell prompt and type Enable-AppV. Press the enter-key
image

Once you attempt to re-open the Visio-drawing you will most likely see a blank Internet Explorer-page instead of the Visio Viewer ActiveX component. The below is from a minimal window.

image

All Microsoft components and suddenly we have a break scenario? The details are actually clarified in a knowledgebase-article relating to Skype for Business, Internet Explorer and App-V;

By default, Explorer.exe and Internet Explorer are listed there. Therefore, when the iexplore.exe process runs, it has the APPVEntsubsystem32.dllloaded in Internet Explorer. When Office C2R detects that APPVEntsubsystem32.dll is loaded into Internet Explorer, it does not load jitv.dll or APPVISVSubsystem32.dll into Internet Explorer. As a result, there is no registry redirection support.
When the JavaScript that’s running in Internet Explorer tries to create any ActiveX objects that are part of the Office C2R package, that operation fails and the Office C2R and SharePoint integration are broken. Office C2R and App-V dynamic virtualization aren’t designed to co-exist; therefore, Office C2R disables Dynamic Virtualization when it detects that AppV client binaries are loaded in Internet Explorer to prevent double hooking.

The article unfortunately provides no fix for a Windows 10 – 1607 unless someone is wanting to decrease the feature set for App-V. Browsing the web allows a little gem to be spotted in the comment section of Dan Gough’s amazing blog – the comment is from an Andrew G:

and also there is a registry key suggested by MS:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\ClickToRun\OverRide
keyname=AllowJitvInAppvVirtualizedProcess (reg_dword)
keyvalue=1

Searching for this registry key on google presents only a few results (one spiceworks thread) are found. A hidden gem, I presume?

Add the registry key and immediately the Visio drawing can be opened without issues

image

2017-08-22 Update

According to Roy Essers – these registry keys will be automatically created on Windows 10 – 1703

Office 365 / 2013 and App-V – Exclude apps

With the latest release (June 5) of Office Deployment Tool there is the ability to exclude applications when creating a package. For example, if you don’t want to deploy – say Lync? – even though you are technically licensed for it.

How does it work?

Create your XML-file

The XML defines what product you want to deploy / create an App-V package for.

A reference can be found on Technet, with the entire list of all applications that can be excluded. Do note that each application you want to exclude is a new line within the XML-file

image

<Configuration>

<Add SourcePath="c:\media\" OfficeClientEdition="32" >
<Product ID="O365ProPlusRetail">
<Language ID="en-us" />
<ExcludeApp ID="Access" />
<ExcludeApp ID="InfoPath" />
<ExcludeApp ID="Lync" />
</Product>
</Add>
<Display Level="None" AcceptEULA="TRUE" />
<Property Name="AUTOACTIVATE" Value="1" />
</Configuration>

Run the command-line

Download source media;

 setup.exe /download c:\media\configuration.xml

Create the App-V package;

setup.exe /packager c:\media\configuration.xml c:\media\package

Now you have a package!

Just to deploy!

Remember, Office is only supported to be deployed as a global package when using App-V

 

Read more about this on Technet!

Office and its poor handling of slow-links

Office is and has been a core application for a quite a while within most Windows environments.  This is a small list of things that have been adopted to make the user experience better for users not located close to the file-servers, or articles that allow you to understand why things happens.

Slow network performance when you open a file that is located in a shared folder on a remote network computer
Known issues with Office if Desktop or My Documents is redirected
An Office program is slow or may appear to stop responding (hang) when you open a file from a network location
Excel workbooks may open slowly over the network
Slow performance when you browse the My Documents folder in the document library in Windows 7 or in Windows Server 2008 R2

and for the PST / OST-files;

Limits to using personal folders (.pst) files over LAN and WAN links
Network Stored PST files … don’t do it!

Access

Using a wan with ms-access? How fast, how far?

Office 2010 and App-V 5

Sequencing Office 2010 with App-V 5 is quite simple and actually less of a hassle compared to the instructions for the previous version of App-V (4.6). The instruction still requires full attention of the person executing them, but there are less steps to mix-up things with. Most likely – this is due to the new Virtual Extensions in App-V 5 that can more easily integrate any product into the operating system.

There is a known issue list posted by Microsoft that details some topics that are quite interesting and will present a few gotchas to any one deploying this.

And, as always; Read Aaron Parkers whitepaper regarding the virtualization of Office 2010 with App-V. It is a long document, but then again – if you fail to deliver office properly the negative spiral from end-users will drown you in work.

However, its quite a big task to virtualize Office and even with the simplified and more enabled virtual extensions – there are a few gotchas. Like this;

image

There are two Mail Control Panel applets published with the App-V 5.0 integration kit. The 64-bit version doesn’t work out of the box, most likely because its not supposed to be used at all if you are deploying a 32-bit version of Outlook. I can’t say that the same is true for the 32-bit applet if deploying 64-bit version of Outlook – that you may test on your own.

You can manually correct this by locating the following registry key;

HKEY_CLASSES_ROOT\CLSID\{005CB1F2-224F-4738-B051-91A96758F50C}\shell\open\command

Set the default value to REG_EXPAND_SZ to;

C:\ProgramData\App-V\CAA7FF95-824E-461C-8DBB-0FCB2431415D\F7ABB870-0634-445A-867A-5AB1D09C7BE5\Root\Client\AppVLP.exe" rundll32.exe shell32.dll,Control_RunDLL "C:\ProgramData\App-V\CAA7FF95-824E-461C-8DBB-0FCB2431415D\F7ABB870-0634-445A-867A-5AB1D09C7BE5\Root\Office14\MLCFG32.CPL

Well – actually don’t. The above reference is the specific path to the unique guid of my personal package.  Pick up _your_ specific path from the 32-bit key;

HKEY_CLASSES_ROOT\Wow6432Node\CLSID\{72F3C31D-95DE-4d79-9979-FB899BB89427}\shell\open\command

App-V 5 and Office 2013 Preview packages

To be able to import the Office 2013 Preview Packages that can be downloaded – you need the following;

1. App-V 5 beta 2 client

2. Scripts needs to be enabled for the import to occur. To enable this and then import – run the following Powershell commands;

Set-ExecutionPolicy RemoteSigned
Import-Module AppvClient
Set-AppVClientConfiguration -EnablePackageScripts 1
Add-AppvClientPackage 'C:\media\ProPlusVolume_VisioProVolume_ProjectProVolume_en-us_x86.appv' | Publish-AppvClientPackage -Global

Obviously – you need to alter the path to where the package is located.

Virtualized Office 2010 and Extended MAPI

In the forums there are a couple of threads which state that using the Send file via default mail-client fails in certain instances (most commonly when using any Adobe software) when using a virtual Outlook with the Office Deployment-kit.
In short, they open their application (Adobe Reader) and choose  a menu which allows them to directly forward their document to a new e-mail (click the letter in Adobe Reader available from the toolbar). Most commonly this fails with an error stating that there is no default mail client (and sometimes afterwards a more obscure error)

The below article explains MAPI and is quite useful;
http://support.microsoft.com/kb/315458
Which under #3 states the following;

3.It then looks under the client’s key to find the path of the correct DLL to load. If the function is a Simple MAPI function, it loads the DLL specified by the DllPath value, and then calls the function. If the function is an Extended MAPI function, it loads the DLL specified by the DllPathEx value. After finding the appropriate DLL, it then calls the function.

 

In the case of Microsoft Outlook, for example, it looks for the value of DLLPath or DLLPathEx under the following key:
HKEY_LOCAL_MACHINE\SOFTWARE\Clients\Mail\Microsoft Outlook

Reviewing a procmon log to see what the application does – the following was found;
Within %TEMP% there are two log-files for the Mail proxy;
MapiProxyServer.log
MapiProxyClient.4916.log

Its nice to know there are log files for troubleshooting- they don’t tell us a whole lot about the behavior currently under investigation though and will only show if the proxy is initiated. Adobe Reader (in this case) fails before the proxy is actually used – so the two log-files were only located during a successful attempt to kick-start the proxy (right-click a file and choose send-to).

The following is being accessed by Adobe Reader while invoking the action to send an e-mail;

image

Considering the above statement this tells us;
1. Adobe Reader uses an Extended MAPI function
2. That’s not supported when using a virtual Outlook with the Office deployment kit since DLLPathEx isn’t created when using the kit

The Process Monitor capture above shows us that there are several registry keys and files that are traversed – to understand the flow the previously mentioned KB-article can be used to decipher why certain things are accessed in the very specfic.

First of all – if one of the below functions are used;
◦MAPIAddress
◦MAPIDeleteMail
◦MAPIDetails
◦MAPIFindNext
◦MAPIFreeBuffer
◦MAPILogoff
◦MAPILogon
◦MAPIReadMail
◦MAPIResolveName
◦MAPISaveMail
◦MAPISendDocuments
◦MAPISendMail

Its called Simple MAPI and the registry value DLLPath is used to locate the default main client. This seems to correspond to the most commonly used parts of the mail-client, however if any other function is used – DLLPathEx is lookedup to find the extended MAPI. Read more about MAPI from Microsoft in the article Differences between CDO, Simply MAPI and Extended Mapi.  If the lookup fails for the above registry value needed – a search for mapi32x.dll is started. Mapi32x.dll is a fallback and quite often not available at all on  a system. If you program starts searching for this – it means something has most likely failed.

Last stop is to present the user with a message that there is no mail-client – defined therefore it will check the PreFirstRun-key (perhaps you have a mail-client, buts its not setup?) or the NoMailClient for the corresponding message to present the users.

If reviewing a package containg a copy of Outlook – the keys looks like this;

image

Opening the file with PE Explorer or Resource Hacker reveals the below information regarding the OLMAPI32.dll file;

image

It seems that the file originated from MAPI32.dll – however offering an upgraded set of functionality.

Traversing the registry and comparing what Office 2010 layed down under the HKLM\Software\Clients key and what the Office 2010 Deployment Kit layed down showed some staggering limitations. A native install creates the following;

image

The Office 2010 App-V Deployment Kit creates the following;

image

We have 1 proxy with the deployment kit and 4 when using a native install. The MAPI, as we now know, is not complete either.

Threads;

http://social.technet.microsoft.com/Forums/en-US/appvgeneralsequencing/thread/0df815ae-19d6-4a2a-b028-b636952c91c9

http://social.technet.microsoft.com/Forums/en-US/appvgeneralsequencing/thread/8b028304-866d-4288-89df-01fd81e56b3e

http://social.technet.microsoft.com/Forums/en-US/appvgeneralsequencing/thread/149602b4-f894-4955-8b0e-fc7bff56e65e

http://social.technet.microsoft.com/Forums/en-US/appvclients/thread/a0f6e9ac-d3f7-4c86-831c-f93daee11511

Office 2007 without Outlook

Part 2;
Well, Finally – here comes the complete article of howto deploy office without having Outlook as the default mail client

Part 1;

If you have deployed Office, you probably deployed it either with Outlook or without.

However, if you deployed it with Outlook – you probably wanted Outlook as the default mail-client. This isn’t the case for everyone, and that gave me a headache a while back. Loads of registry hacks and work later (and more work later on) I solved the issue thanks to a techician writing a bat-file resetting the registry keys.

Now I saw this blog-post where the Office Resource team actually will publish an article on howto resolve this automagically.

I wish I had that one year ago.