App-V 5 – How App-V 5 Handles Software Clients, Application Capabilities, and URL Protocol Handlers

App-V 5 brought a lot more options for integrating virtual applications with the local operating system. This is a big win for those organizations wanting to move as many of their applications as possible over to the APPV package format. These Extension Points can be defined within the App-V package manifest (if detected during sequencing) or applied through dynamic configuration. Extension points such as Shortcuts and FTAs (file type associations) as well as advanced ones such as COM and Environment Variables are well known and are not exactly new to App-V. What I wanted to do was dive into some of the lesser known extension points. Particularly some of those that are new to App-V 5.

Software Clients

Software Clients, often referred to as SPAD clients (for “Set Program Access and Defaults) are documented well in the following MSDN article:

“How to Register an Internet Browser or Email Client with the Windows Start Menu”

https://msdn.microsoft.com/library/windows/desktop/dd203067

The way they work is to basically register as a software client within the registry under HKEY_LOCAL_MACHINE\Software\Clients

 

Then the application can show up as an option under the Set Program Access and Computer Defaults in the Control Panel:

Default web browsers, media players, email clients, instant messaging, and other applications can have defaults configured here. This will subsequently help to control other defaults for shell actions such the Right-Click --à Send To à Mail Recipient action.

App-V virtual applications can be used through the Software Client Extension Point to have the following applications configured through the SPAD option in the Windows Control Panel:

  • Email

  • IM (Instant Messaging)

  • Media Players

  • Java VM

To clarify - only the above clients are currently supported.

A Software Client registration is defined within the manifest and can be adjusted via dynamic configuration as well. An example below shows the MAPI client extension being registered for Outlook 2013 as a Software Client:

 <SoftwareClients Enabled="true">

        <ClientConfiguration EmailEnabled="true" />

        <Extensions>

          <Extension Category="AppV.SoftwareClient">

            <SoftwareClients>

              <Email MakeDefault=”true”>

                <Name>Microsoft Outlook</Name>

                <Description>Microsoft Outlook</Description>

                <InstallationInformation>

                  <RegistrationCommands>

                    <Reinstall>[{AppVPackageRoot}]\Office15\OUTLOOK.EXE /spadreinstall</Reinstall>

                    <HideIcons>[{AppVPackageRoot}]\Office15\OUTLOOK.EXE /spadhideicons</HideIcons>

                    <ShowIcons>[{AppVPackageRoot}]\Office15\OUTLOOK.EXE /spadshowicons</ShowIcons>

                  </RegistrationCommands>

                  <IconsVisible>1</IconsVisible>

                  <OEMSettings />

                </InstallationInformation>

                <ShellCommands>

                  <ApplicationId>[{AppVPackageRoot}]\office15\OUTLOOK.EXE</ApplicationId>

                  <Open>"[{AppVPackageRoot}]\Office15\OUTLOOK.EXE" /recycle</Open>

                </ShellCommands>

                <MAPILibrary>mapi32.dll</MAPILibrary>

                <ExtendedMAPILibrary>[{AppVPackageRoot}]\Office15\OLMAPI32.DLL</ExtendedMAPILibrary>

                <MailToProtocol>

                  <Description>URL:MailTo Protocol</Description>

                  <EditFlags>2</EditFlags>

                  <DefaultIcon>[{AppVPackageRoot}]\Office15\OUTLOOK.EXE,-9403</DefaultIcon>

                  <ShellCommands>

                    <ApplicationId>[{AppVPackageRoot}]\office15\OUTLOOK.EXE</ApplicationId>

                    <Open>"[{AppVPackageRoot}]\Office15\OUTLOOK.EXE" -c IPM.Note /mailto "%1"</Open>

                  </ShellCommands>

                </MailToProtocol>

              </EMail>

            </SoftwareClients>

          </Extension>

        </Extensions>

      </SoftwareClients>

 

In the example XML above for Outlook, we have four elements that are essential to understanding how this fits into integration as a software client:

<SoftwareClients Enabled="true">

This element turns on the extension subsystem.

 <ClientConfiguration EmailEnabled="true" />

This element turns on integration of the Email clients.

 <EMail MakeDefault="true">

This element does two things - tells the application it is an email software client and makes it the default selected Software Client. Yes, both the E and the M are capitalized. That is not a typo.

<MAPILibrary>mapi32.dll</MAPILibrary>

This element shows the DLL that will be registered.

 

In the example in the picture below, Trillian is registered through dynamic configuration as an Instant Messaging Software Client. Notice it is not enabled as default.

 

Application Capabilities

Do not confuse Software Clients (which are set under SPAD) with Application Capabilities which are set under Default Programs in the Control Panel. With this extension point, applications provide their capabilities to the operating system. The capabilities and mappings are aggregated in the HKLM\RegisteredApplications key.

  

 Users can then use these capabilities to set the default programs through the Default Programs interface:

For more information on how this is handled internally, check out the background on MSDN:

https://msdn.microsoft.com/en-us/library/windows/desktop/cc144162(v=vs.85).aspx

One final note on Application Capabilities: Even though these settings are per user as of the release of Windows 8, App-V 5 only supports this extension point for globally published virtual applications.

 

URL Protocol Handlers

The URL Protocol Handler associates a virtual application with a URI protocol. This has always been possible with App-V but the extension point integrations ensures that it gets configured at deployment through the extension point. Rather than associating an application with a specific document type like an FTA, the application is associated with the protocol itself.

The URL Protocol subsystem is based off standards defined for URI registration which is documented here:

https://msdn.microsoft.com/en-us/library/ie/aa767914(v=vs.85).aspx

If the package is user targeted, the URL protocol handler registration will occur under HKCU\Software\Classes. If the package is machine targeted or globally published, URL protocol handlers will be registered under HKLM\Software\Classes.

An example of URL Protocol extension point registration is below:

  <URLProtocols Enabled="true">

      <Extensions>

        <Extension Category="AppV.URLProtocol">

          <URLProtocol>

            <Name>FirefoxURL</Name>

            <ApplicationURLProtocol>

              <Description>Firefox URL</Description>

              <DefaultIcon>[{ProgramFilesX86}]\Mozilla Firefox\firefox.exe,1</DefaultIcon>

              <FriendlyTypeName>Firefox URL</FriendlyTypeName>

              <EditFlags>2</EditFlags>

              <ShellCommands>

                <DefaultCommand>open</DefaultCommand>

                <ShellCommand>

                  <ApplicationId>[{ProgramFilesX86}]\Mozilla Firefox\firefox.exe</ApplicationId>

                  <Name>open</Name>

                  <CommandLine>"[{ProgramFilesX86}]\Mozilla Firefox\firefox.exe" -requestPending -osint -url "%1"</CommandLine>

                  <DdeExec>

                    <NoActivateHandler>true</NoActivateHandler>

                    <Application>Firefox</Application>

                    <Topic>WWW_OpenURL</Topic>

                    <DdeCommand>"%1",,0,0,,,,</DdeCommand>

                  </DdeExec>

                </ShellCommand>

              </ShellCommands>

            </ApplicationURLProtocol>

          </URLProtocol>

        </Extension>

      </Extensions>

    </URLProtocols>

Comments

  • Anonymous
    June 30, 2015
    ~ John Behneman | Senior Support Escalation Engineer Hello everyone, John Behneman here again. I’d like
  • Anonymous
    June 30, 2015
    ~ John Behneman | Senior Support Escalation Engineer Hello everyone, John Behneman here again. I’d like
  • Anonymous
    March 15, 2016
    Maybe it's a stupid question BUT how to "run" XML files on the actual computers?
    • Anonymous
      December 14, 2016
      markus,the referenced xml file is the file ***UserConfig.xml file of your package. It is locaded in root of package folder.update it and import in App-V management.