App-V 4.6 Compliance Baseline for SCCM 2012

Just created a Compliance-baseline for the App-V 4.6 client to be used within System Center Configuration Manager 2012 .

image

Above is a sample screenshot of the items that are beeing checked – some of them contains remediation tasks, others are just for information. There are quite a few checks there that should be verified if they suite your environment – this is the recommended practices of me, myself and not Microsoft or anyone else. The CAB-file can be download here; SCCM2k12MSAppV46baseline.cab

The checks;

AllowDisconnectedOperation
Enables or disables disconnected operation. Default value is 1 enabled, and 0 is disabled. When disconnected operations are enabled, the App-V client can start a loaded application even when it is not connected to an App-V Management Server.
Checks for 1
Remediate: Yes

AllowIndependtFileStreaming
Indicates whether streaming from file will be enabled regardless of how the client has been configured with the APPLICATIONSOURCEROOT parameter. If set to FALSE, the transport will not enable streaming from files even if the OSD HREF or the APPLICATIONSOURCEROOT parameter contains a file path.
0x0=False (default)
0x1=True
Checks for 1
Remediate: Yes

App-V Version
Checks the version of sfttray.exe
Checks for 4.6.1.30121
Remediate: No

AutoLoadTarget
Indicates what will be auto-loaded when any given AutoLoad triggers occur. Bit mask values:
(0) None: No auto-loading, regardless of what triggers may be set.
(1) PreviouslyUsed (default): If any AutoLoad trigger is enabled, load only the packages where at least one application in the package has been previously used—that is, started or precached.
(2) All: If any AutoLoad trigger is enabled, all applications in the package (per package) or all packages (set for client) will be automatically loaded, whether or not they have ever been started.
Checks for between 0-2
Remediate: No

AutoLoadTriggers
AutoLoad is a client runtime policy configuration parameter that enables the secondary feature block of a virtualized application to be streamed to the client automatically in the background. The AutoLoad triggers are flags to indicate events that initiate auto-loading of applications. AutoLoad implicitly uses background streaming to enable the application to be fully loaded into cache. The primary feature block will be loaded first, and the remaining feature blocks will be loaded in the background to enable foreground operations, such as user interaction with applications, to take place and provide optimal perceived performance.
Bit mask values:
(0) Never: No bits are set (value is 0), no auto loading will be performed, because there are no triggers set.
(1) OnLaunch: Loading starts when a user starts an application.
(2) OnRefresh: Loading starts when the application is published. This occurs whenever the package record is added or updated—for example, when a publishing refresh occurs.(4) On
Checks for between 0-5
Remediate: No

Cache Percent Free Space
This information is captured on the client computer by a performance counter called “App Virt Client Cache” and it has three components; “Cache size (MB)”, “Cache free space (MB)” and “% free space”. You can use Performance Monitor to display the information graphically.
http://blogs.technet.com/b/appv/archive/2009/04/06/how-to-determine-the-space-remaining-in-the-app-v-client-cache.aspx
Checks for greater than 20 %
Remediate: No

Drive Letter
Drive where App-V file system will be mounted, if it is available. This value is set either by the listener or the installer, and it is read by the file system.
Checks for Q:
Remediate: No

File Size
Maximum size in megabytes of file system cache file. If you change this value in the registry, you must set State to 0 and reboot.
Checks for must exist
Remediate: No

LogMinSeverty
Controls which messages are written to the log. The value indicates a threshold of what is logged—everything less than or equal to that value is logged. For example, a value of 0x3 (Warning) indicates that Warnings (0x3), Errors (0x2), and Critical Errors (0x1) are logged.
Value Range: 0x0 = None, 0x1 = Critical, 0x2 = Error, 0x3 = Warning, 0x4 = Information (Default), 0x5 = Verbose.
The log level is configurable from the Application Virtualization (App-V) client console and from the command prompt. At a command prompt, the command sftlist.exe /verboselog will increase the log level to verbose. For more information on command-line details see
http://go.microsoft.com/fwlink/?LinkId=141467http://go.microsoft.com/fwlink/?LinkId=141467
Checks for between 0-4
Remediate: No

LogRolloverCount
Defines the number of backup copies of the log file that are kept when it is reset. The valid range is 0–9999. The default is 4. A value of 0 means no copies will be kept.
Checks for between 1-4
Remediate: No

Online
Enables or disables offline mode. If set to 0, the client will not communicate with App-V Management Servers or publishing servers. In disconnected operations, the client can start a loaded application even when it is not connected to an App-V Management Server. In offline mode, the client does not attempt to connect to an App-V Management Server or publishing server. You must allow disconnected operations to be able to work offline. Default value is 1 enabled (online), and 0 is disabled (offline).
Checks for between 0-1
Remediate: No

Requireauthorizationifcached
Indicates that authorization is always required, whether or not an application is already in cache. Possible values:
0=False: Always try to connect to the server. If a connection to the server cannot be established, the client still allows the user to launch an application that has previously been loaded into cache.
1=True (default): Application always must be authorized at startup. For RTSP streamed applications, the user authorization token is sent to the server for authorization. For file-based applications, file ACLs control whether a user may access the application.
Restart the sftlist service for the change to take effect.
Checks for 0
Remediate: Yes

SystemEventLogLevel

Indicates the logging level at which log messages are written to the NT event log. The value indicates a threshold of what is logged—that is, everything equal to or less than that value is logged. For example, a value of 0x3 (Warning) indicates that Warnings (0x3), Errors (0x2), and Critical Errors (0x1) are logged.
Value Range
0x0 = None
0x1 = Critical
0x2 = Error
0x3 = Warning
0x4 = Information (Default)
0x5 = Verbose
Checks for between 0-4
Remediate: No

TrayVisibility
Checks for 2
Remediate: No

Update as of 2012-09-06
Multiple MDM
You may also see these client launch errors, especially on Terminal Servers:

xxxxxx-xxxxxx03-00001002
xxxxxx-xxxxxx0A-0000E005
xxxxxx-xxxxxx 0C-0000003C

Instead of, or in addition to these, you may also notice periodic hangs, as well as a frequent depletion of paged pool memory resources.

To prevent this issue, during the initial sequencing of Office 2007 (or via modification of the existing package) we recommend that you remove the Microsoft Office Diagnostics and Office Source Engine services from any sequenced package running Office 2007 or any sequence that includes any Office 2007 application.  This will require the removal of these virtual services under the Virtual Services Tab in the Softgrid/App-V Sequencer

http://blogs.technet.com/b/appv/archive/2009/01/22/reducing-resource-requirements-for-computers-running-virtualized-microsoft-office-2007.aspx
Checks for less than 1
Remediate: No

Multiple OSE
You may also see these client launch errors, especially on Terminal Servers:

xxxxxx-xxxxxx03-00001002
xxxxxx-xxxxxx0A-0000E005
xxxxxx-xxxxxx 0C-0000003C

Instead of, or in addition to these, you may also notice periodic hangs, as well as a frequent depletion of paged pool memory resources.

To prevent this issue, during the initial sequencing of Office 2007 (or via modification of the existing package) we recommend that you remove the Microsoft Office Diagnostics and Office Source Engine services from any sequenced package running Office 2007 or any sequence that includes any Office 2007 application. This will require the removal of these virtual services under the Virtual Services Tab in the Softgrid/App-V Sequencer

http://blogs.technet.com/b/appv/archive/2009/01/22/reducing-resource-requirements-for-computers-running-virtualized-microsoft-office-2007.aspx
Checks for less than 1
Remediate: No

Multiple Office Diagnostics
You may also see these client launch errors, especially on Terminal Servers:

xxxxxx-xxxxxx03-00001002
xxxxxx-xxxxxx0A-0000E005
xxxxxx-xxxxxx 0C-0000003C

Instead of, or in addition to these, you may also notice periodic hangs, as well as a frequent depletion of paged pool memory resources.

To prevent this issue, during the initial sequencing of Office 2007 (or via modification of the existing package) we recommend that you remove the Microsoft Office Diagnostics and Office Source Engine services from any sequenced package running Office 2007 or any sequence that includes any Office 2007 application. This will require the removal of these virtual services under the Virtual Services Tab in the Softgrid/App-V Sequencer

http://blogs.technet.com/b/appv/archive/2009/01/22/reducing-resource-requirements-for-computers-running-virtualized-microsoft-office-2007.aspx
Checks for less than 1
Remediate: No

Citrix – LogoffSyscheckModules
If you are running Citrix XenApp on a Terminal Server/RDS Server, you could be waiting on another seamless session to logoff. A good thing to verify is that the Citrix WFSHELL process releases SFTDCC properly
http://madvirtualizer.wordpress.com/2011/08/03/
Checks for sftdcc.exe
Remediate: No

App-V 5, SCCM 2012 SP1 and the wheels behind it all

App-V 5 has introduced some new ways to configure an application – apart from whats available in the GUI. You can see two .xml-files (apart from the report.xml) generated along with the rest of the package – in three other blog articles these were posted and given some thought. Lets ponder though – how do you deploy these using Configuration Manager 2012 SP1 CTP2 ?

Well – its easier than you imagine. Lets begin with our package!

image

As you can see – this is the new standard-output of an App-V 5 sequence. Lets keep the names – that is very important. Don’t rename any files and keep the files intact within the folder. Especially the _deploymentconfig and _userconfig. You get to select the .appv file, but the others are needed aswell. Otherwise you might get this;

image
Unable to find the specified file.

or this;

image
Imported filed, fix errors and try again.

Those are some awesome error messages, right? Try to avoid renaming files (sometimes it works anyways) or removing them from the App-V folder – its for your own good.

So we have established that the _deploymentconfig.xml and _userconfig.xml are necessary files that are actually used. We can now move forward in the wizard.

Next up is to verify our Deployment Type and in particular the Publishing-tab within our Deployment Type configuration.

image

Under Publishing we can select what applications should be available . Its not quite clear when this goes into effect. Since we have imported the _deploymentconfig.xml already – that file isn’t modified when we toggle the publishing of an application. Verifying the contents within the distribution point shows an unaltered file, whereas the file has been modified once it reaches the client.

File on the distribution point;image

File on the client;image

We can review the appenforce.log to see what takes place once a client receives the deployment.

This is the command line for adding the package;

powershell.exe -ExecutionPolicy Bypass import-module 'C:\Program Files\Microsoft Application Virtualization\Client\AppvClient\AppvClient.psd1';  Add-AppvClientPackage -Path 'C:\Windows\ccmcache\d\Mozilla Thunderbird 9.0.appv'

Applying the deployment-configuration (because this was deployed to a machine)

powershell.exe -ExecutionPolicy Bypass import-module 'C:\Program Files\Microsoft Application Virtualization\Client\AppvClient\AppvClient.psd1';  Set-AppvClientPackage -PackageID 2d9b4db6-3386-4823-8d33-07c0caa4aaf4 -VersionID 7749fb34-1764-4f61-9161-3d0061bd8268  -DynamicDeploymentConfiguration 'C:\Windows\CCM\SystemTemp\AppVTempData\2d9b4db6-3386-4823-8d33-07c0caa4aaf4_DeployConfig.xml'

Publishing it for the users – since its deployed to a machine the –Global is used.

powershell.exe -ExecutionPolicy Bypass import-module 'C:\Program Files\Microsoft Application Virtualization\Client\AppvClient\AppvClient.psd1';  Publish-AppvClientPackage -PackageID 2d9b4db6-3386-4823-8d33-07c0caa4aaf4 -VersionID 7749fb34-1764-4f61-9161-3d0061bd8268 –Global

As you can see – C:\Windows\CCM\SystemTemp\AppVTempData is a temporary working folder for the SCCM-client to store these configuration files for when they are needed. The files can be reviewed in clear text and gives a chance to see what is actually deployed. Mozilla Thunderbird was deployed successfully (according to SCCM), but no application is visible. Since we can verify the configuration file used – we can see that the application was disabled entirely. This could either be done by the configuration-file we imported or through the GUI within SCCM.

What happens if we alter a configuration file after we have imported it? We can easily choose to create a new Deployment Type and reimport the package;

image

Since we reimport the package – the configuration files will be re-read and available for deployment. Since the distribution point now only stores a file once – we don’t need to worry about how many times we import a specific package (as long as the files are the same). We could have 5, 20 maybe even 100’s of Mozilla Thunderbird – all tailored for different needs within our configuration files!

App-V 5 standalone and Connection Groups

App-V 5 standalone has become a lot easier to deploy as of the new release – we don’t need to configure the client in any particular way and any package can be deployed using an MSI generated automatically by the sequencer. There are certain topics that still need some configuration – Connection Groups is one of them. Lets get started!

Connection Groups allow for virtual applications to interact with each other – it’s the version 2.0 of the Dynamic Suite Composition (DSC). DSC had some major flaws that made its practical use limited and often caused complex scenarios that required extensive troubleshooting. Connection Groups so far looks a lot more improved and hopefully it can be more easy to manage. Within the App-V Server or the SCCM 2012 SP1 there are easy to use ways to administrate these connection groups and deploy – SCCM was previously discussed here.

Since App-V 5 is administrated via powershell and therefore we need to look into the requirements for setting up a Connection Group. I’ll assume that you have installed the App-V client and imported its powershell module. First – we need to define an XML-file that sets the order of the application packages.

<?xml version="1.0" encoding="UTF-8"?>
<AppConnectionGroup AppConnectionGroupId="8601afe3-b565-3143-8ae1-e4f5bba61dcc" VersionId="0ff7a09e-8ed2-654d-80b5-f252ca9037d3" Priority="0" DisplayName="Freemind" xmlns="http://schemas.microsoft.com/appv/2010/virtualapplicationconnectiongroup">
<Packages>
<Package PackageId="5955a77b-b40f-4c1a-a9a4-b798591e8524" VersionId="8946295f-751e-4b4d-a887-eda103bb88f2">
</Package>
<Package PackageId="ea883402-3266-43ff-b4bc-a3bf0ad1905b" VersionId="3abd54ec-6055-43c1-95c5-11a827c6c992">
</Package>
</Packages>
</AppConnectionGroup>

Lets go through the XML-file

AppConnectionGrouId needs to be a unique identifier for Connection Group. In case you are out of imagination in creating one – you can run the following powershlle-command to get one;

 [guid]::NewGuid() 

This is the output;

image

You can repeat the same for VersionID – which needs to be updated for each version of the Connection Group.

DisplayName can be anything – SCCM sets a unique ID that it keeps track of. Since we are doing this manually – an easy to understand name might be good.

The next section is AppV Packages. You will need to know the PackageID and the VersionID from the packages you are connecting. This information can be retrieved by running the powershell command Get-AppVClientPackages

image

Once we have created the file – named freemind.xml in this case, we can actually go by setting up the connection group. The below one-liner will add the Connection Group and publish the Connection Group globally (for all users that is).

Add-AppvClientConnectionGroup -Path 'c:\media\freemind.xml' | Enable-AppvClientConnectionGroup –Global

If you want to disable a Connection Group –  you can use the name you set to easily locate it and disable the Connection Group.

 Get-AppvClientConnectionGroup -name freemind | Disable-AppvClientConnectionGroup

App-V 5, SCCM 2012 SP1 and Connection Groups

Since we have so many new releases coming up – it was time to set how well they co-exist. App-V 5 Beta 2 is out and inorder to support that in a SCCM 2012 environment – we need SCCM 2012 SP1 deployed into the environment. Once that happens – some new options are available that we will browse through.

When creating a new application  – we have the option of two different Application Virtualization applications. One is the legacy-format of App-V 4.6, and now App-V 5 is also available as a choice.

image

The wizard is pretty easy – you select the .appv-file created during your packaging efforts and the application will be imported into the environment. If you verify the properties of the deployment type – you can see a new tab;

image

Virtual Environments can be setup within the newly available node App-V Virtual Environments just below the rest of the nodes in Application Management.

image

Creating a new Virtual Environment might seem scary, however it simply is the new version of what was previously called Dynamic Suite Composition. From an App-V perspective – its called Connection Groups. Where the name Virtual Environment comes from seems odd – but we are just creating Connection Groups in the end.

image

Each connection-group needs a name, a name that only seems to be visible through SCCM-console. Reviewing later on whats deployed on the client – the name does not appear anywhere. Next step is to start adding applications to the Connection Group.

image

You can only see App-V 5 applications listed, keeping adding them one at a time…

image

It does matter in which order you add them – however only from the usage of the application. SCCM will not deploy any applications automatically part of a Connection Group, you need to make any virtual applications deployed on their own or as part of a dependency. Once a Virtual Environment (aka Connection Group) is created – if all the applications are available on a client – the Connection Group will be created through a series of Powershell commands.

image

image

The client actually executes the following commands to ensure that the Connection Group is created;

powershell.exe -ExecutionPolicy Bypass import-module 'C:\Program Files\Microsoft Application Virtualization\Client\AppvClient\AppvClient.psd1'; Add-AppvClientConnectionGroup -Path 'C:\Windows\CCM\SystemTemp\AppVTempData\ConnectionGroup_609C8E91-7A45-49D8-85EF-6F97393F6AD7.xml'
powershell.exe -ExecutionPolicy Bypass import-module 'C:\Program Files\Microsoft Application Virtualization\Client\AppvClient\AppvClient.psd1'; Enable-AppvClientConnectionGroup -GroupId 609C8E91-7A45-49D8-85EF-6F97393F6AD7 -VersionId 11998038-9881-4E71-AE3F-05B8CC736CF8  -Global

As you can see – there is a XML-file referenced. This file contains the configuration of the group;

<appv:AppConnectionGroup xmlns:appv="http://schemas.microsoft.com/appv/2010/virtualapplicationconnectiongroup" AppConnectionGroupId="609C8E91-7A45-49D8-85EF-6F97393F6AD7"
VersionId="11998038-9881-4E71-AE3F-05B8CC736CF8" IgnorableNamespaces="" DisplayName="ScopeId_2C452F22-4D7F-4190-B8A7-296878D46822/VirtualEnvironment_377202b9-16f7-465a-831d-60e20961c0a1">
<appv:Packages>
<appv:Package PackageId="52493623-312b-4187-9d0f-505d4b8cb791" VersionId="d23059ee-91ec-466b-a115-9157b4be0604"/>
<appv:Package PackageId="6d099036-5110-49bc-a2b9-c6d954bad70e" VersionId="af0d1d10-e5cc-47b4-8659-920a70acefab"/>
</appv:Packages>
</appv:AppConnectionGroup>

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.

Virtual Application Extensions and the future

App-V 5 is in the loop and this time around Microsoft has greatly revamped the architecture on how the virtualization part of App-V will be implemented. However, inorder to understand the tremendous advantage we will have with the new architecture – lets look at previous problems of Application Virtualization.

Softgrid and what became Microsoft Application VIrtualization was a great product that made deploying applications very simple and removed a large portion of why application deployments were scary. As opposed to deploying an application in its traditional sense – melting it together with the operating system and all its other application – we gained the possibility of providing a virtualized layer on top of the operating system. This layer provided two main components which removed the threat of breaking other applications or the operating system – virtualization and isolation. By allowing only a specific agent (aka sfttray) to spin up the virtual environment we created a nice line of defense that would ensure our computers integrity and allow the application to utilize local system resources.

The downside of the coin was that if only a single agent could access our virtual environment – we have also isolated the resources within that virtual environment and any type of call into that environment need to pass through our single guardian. The main problem with this was that sfttray (our guard) only allowed certain things to pass through by default, and as Windows and applications came up with new ways of integrating with applications – those “defaults” soon became to few and eventually altered the user experience of an application. For quite some time there haven’t been any technical limitation to virtualize just about any application, but the client that was delivering those applications proved to be very limited in allowing users to interact with the applications seamlessly. Sfttray supported file type associations and shortcuts. Simply not good enough if you are supporting todays demanding end-users.

App-V 5 will change this paradigm and provide an architecture that can ensure future abilities will be extended with much less effort – if any effort is necessary. As opposed to passing through a guard – we will not be limited to accessing it via an agent instead we can now gain access directly and only virtualizing it. Sfttray is history – and so is the Q: – drive. Lets poke around at a virtual application to understand why this architecture makes such a difference.

Meet the shortcut. A shortcut was supported in App-V 4, however the command-line in the shortcut always referenced sfttray.exe and then invoking your virtual application. Say hello to App-V 5 type of shortcut;

image

As you can see – we are now directly calling vlc.exe. It seems to be placed directly onto our filesystem – infact it is!

image

Directly under C:\Programdata – our packages are now placed in the native filesystem. As you can see we also have another improvement which is not even mentioned – the previous requirement of a unique 8.3-compliant name is gone. Instead all packages are executed under their unique (very long) GUID – to allow us to focus more on application packaging and less on naming conventions.

App-V 4 also supported file type associations – which are still there. With an improved experience!

image

This is a wmv-file – associated to our virtualized instance of App-V. Lets say we want to set another file type to be associated with our virtualized VLC. Previously we had to go through sfttray – but that’s gone…

image

VLC is now presented as any other program. Previously we had to retrain our users to select sfttray (here also presented as we allow the App-V 4.6 SP2 and App-V 5 to co-exist on the same system) and then select their program. Now – a native experience is given to the end-user and they can select the application that they want start a file type association with.

This all seems great that the experience with existing extensions (anyone who has been forced to listen to me knows that I call these entry points – but from now on I will favor extensions) – lets see what new stuff is out there. Right-clicking a file type will bring context-menus;

image

If the user is more familiar with altering a file type association through the Default Programs from within the Control Panel – VLC will also be presented here as a regular application;

image

We can see all the file type associations that our virtualized VLC currently is set to be the default application to handle;

image

However, if we insert a DVD – that’s not a file-type association is it? Well – how external media (DVDs for example) are started or at least what options are presented to the end-user is defined from Autoplay in the Control Panel. Yet again – we can see the virtualized VLC showing up as the end-user would expect it to;

image

All of these interactions were previously not available (still possible through manual labor and tweaking in the registry) – now we get them out of the box from a virtualized application! To move further – Spotify will be used to demonstrate even more interaction! When creating a package – a couple of files are created. The content is .appv, the installer in a standalone mode is the .msi – but we also have two configuration files – named Deployment and User config. If reviewing Deployment-config for our Spotify package – we can see the following;

image

This looks awesome – as Spotify has its own protocol handler which allows users to click a link and directly open a playlist within Spotify.

image

This are all visible extensions for the end-user and will make the gap of the experience between a virtual application and a natively installed application even smaller. However, the App-V team didn’t stop here and made even more possible extensions beyond of what we were expecting.

There are two methods that are used under the hood of everything – that provides a greater interaction between applications and allows for seamless exchange of data between applications. Quite often – we admins had to find out the hard way that this “report” for application X actually depend on beeing able to locate Excel, Adobe Acrobat or some other program. Many ways are used to send to the proper data to this “other” program – quite a few articles to resolve problems regarding this inter-application communication problems are written by me personally and even more questions are asked in the forums. We know about them – but what are they really?

AppPaths are one way – its an easy way to locate a needed .EXE if the application has registered itself.  If reading the article – it allows for quite a few different ways to use this feature, however – we most commonly deal with it because a program calls an application (say excel.exe) by simply asking for excel.exe – and not a full path. When registered properly – apppaths will allow us to start our specific version that we currently have installed. Filling in the full-path to the executable in question.

If our application is virtualized (excel.exe for example) – it will not be registered at all and the main application will simply state that you need this application installed. Fortunately – App-V 5 will now allow applications to register themselves properly and there be found by any application (virtualized or not) requesting them!

image

The other alternative are is COM. COM has been around since 1993. COM is something that has been and still is beyond me. Usually – when you realize that an obscure error message is given when the program attempts to send data to an external program COM is related. Wikipedia has a great article which clarifies it to some extent in what ways we are dealing with COM. OLE, OLE Automation, ActiveX, COM+ and DCOM are the more commonly used words.

Here is an example of a COM that was detected by the sequencer;

image

Wow – so we have just learned that App-V 5 will bring in many new ways that will improve the application experience and make previous scenarios that seemed impossible suddenly appear simple and work right out of the box.

SAP GUI and administrator rule file

Did you deploy SAP (virtualized or not) and received the below error message? In this case – you need MS XML 4.0 SP3 installed. This was more commonly available on Windows XP endpoints, but now that people are moving forward with the Windows 7 and Windows Server 2008 R2 it seems to be omitted from any base image deployed.

sapgui1
Failed to load administrator rule file. Check your installation

 

sapgui2

How I learned to stop worrying and installed the App-V Mgt Server

My view on the dedicated and so called “full” infrastructure of the App-V components has been pretty clear – its utterly useless and is always implemented for the wrong reasons. Apart from the fact that its functionality list has been degraded over-time without reason (reporting is in reality not there) – those functions that are there quite often provide a sub-standard implementation (provider policies anyway?). Currently there seem to be two main reasons – where one is mostly used as an excuse for the other – to implement this excuse of a product.

1. It provides a department, group or provider with its own dedicated infrastructure – which it can control and doesn’t have to share with any other department

2. Its fast

Unfortunately the first one can never be solved with any technical measures. Considering that most Microsoft products allow for some type of delegation of permissions (this one doesn’t) and yet there are departments who fight among each other and fail to share resources. App-V provides an easy out to allow these departments to avoid collaborating and go on with their daily operations.

Its fast is usually what keeps people away from Configuration Manager – a policy based client and deployment management tool. Policy-based quite often means waiting time – something that the ConfigMgr team has been addressing very much in the later releases since App-V was acquired by Microsoft.
Fast is good – however, fast doesn’t always mean you can deploy fast. Sometimes it means you break things fast. Quite often the side of things that can turn nasty from an operational perspective.

Lets step away from that and try to implement this. An experience an end-user wouldn’t be able to complete and  something admins struggle with – with the downside that at the end of the road. Its not really properly setup.

First of all – we will be implementing this with a Windows Server 2008 R2 SP1 domain controller. The SQL-engine will be SQL Server 2012 Express with TCPIP as an allowed protocol – installed on the same server. I am avoiding Windows Server 2012 – as the road to get the basic functionality done right in the last version of the the Server OS has been to long to start over. And App-V v5 is coming.

Lets get started.

1. Ensure you do not have .NET Framework 4.0 installed. It will break things – and nobody bothered to fix the installer – see this article for yourself.

2. Setup a couple of pre-reqs. Unless you read the documentation in detail – you will not actually know about this. Recommended is to have;

  • Administrative group (security group – global)
  • Users Group (security group – global)
  • A file-share with read-access for users and read-write access for admins.

3. Get the media and kick-off the installation. The App-V Management Server is actually at App-V 4.5 SP2 – and not 4.6 The reason seems to be that no new functionality has been brought in since App-V 4.5 from a server perspective.

3. If you haven’t done so – you will be warned during the installation. The Management Server actually depends on IIS and will require some components;

  • IIS
  • ASP.NET
  • Security
    • Windows Authentication
  • IIS Management Scripts and Tools
  • IIS 6 Management Compatibility
    • IIS 6 Scripting Tools
    • IIS 6 Management Console
    • IIS 6 Metabase Compatibility
    • IIS 6 WMI Compatibility

4. When you get to pick a SQL-server you might actually get to see your SQL-server in the list. If you don’t – its probably because the SQL Server doesn’t have the SQL Server Browser-service running.

image

5. If you setup a new database – you will be fine. If you decide to reuse an existing database – for any reason – you will get some horrible values in some tables. Once we are finished with the installation – we will verify those.

6. I can’t say why – but the way to select your two previously AD-groups are a bit unique. Nobody decided simply reuse any knowledge?

image

When you click next – you will see a list of possible options of active directory groups.
Weird way go about this…

image

Click next, rinse and repeat for the App-V Users group.
The App-V Admins group will be the people who have access to administrate the server. App-V users will have access to connect to the server. Usually – we set a pretty wide-group, such as Domain Users for the App-V Users group. Or a group containing all Domain Users from all domains. Well – you can’t get any applications if you are not part of this group. Not even if you are an admin.

7. Next up is to select where our packages will be stored. This is a bad place to leave the values as default. Its recommended to set a UNC-path – hopefully something placed on a high-capacity fileserver. Maybe using a DFS-path?

If you do not alter this – you will need to change a registry key afterwards. See this KB-article.

So – the default value below is bad. Set a UNC-path.

image

8. That’s it – kick off the installation and once its done you can restart the computer.

9. Next up is to install a hotfix. KB2007096 is an old article – which still applies to the server. Apply it and get more scalability!

10. Lets continue and check that our database is setup properly. As stated previously – if you install into an existing database – some values will be off. This was first documented by Microsoft as sub-optimal values. If you have more than 100 clients – they are necessary to change.

This is from dbo.Servers

image

Looks alright – max_conn can be increased to 2000

This is from dbo.SOFTGRID_SERVERS

image

The important one here is core_timeout should be the recommended value of 120.

There is one more additional thing to correct before we head out of the database. To resolve some errors when it comes to collecting reporting data. Choose the database  dbo.REPORTING_PACKAGE_INFORMATION and select the column package_name. This column should allow NULLs – and then reporting data can be uploaded correctly from the client. Might aswell sort that out before you have any clients upload stuff.

image

11. Lets head into the exciting part of getting some final details into place. Open Active Directory Users and Computers. Locate the computer-account on which your App-V Mgt Server is running on and ensure that its set to be trusted for delegation – it looks like this;

image

12. Lets verify the service principal names setup. Since all the components are installed on this one server – we should see; softgrid, MSSQL and HTTP.

This is what is done;

Registered ServicePrincipalNames for CN=WIN-Q1IO4I7IPRU,OU=Domain Controllers,DC
=DCLAB,DC=local:
SoftGrid/WIN-Q1IO4I7IPRU
SoftGrid/WIN-Q1IO4I7IPRU.DCLAB.local
Dfsr-12F9A27C-BF97-4787-9364-D31B6C55EB04/WIN-Q1IO4I7IPRU.DCLAB.local
ldap/WIN-Q1IO4I7IPRU.DCLAB.local/ForestDnsZones.DCLAB.local
ldap/WIN-Q1IO4I7IPRU.DCLAB.local/DomainDnsZones.DCLAB.local
DNS/WIN-Q1IO4I7IPRU.DCLAB.local
GC/WIN-Q1IO4I7IPRU.DCLAB.local/DCLAB.local
RestrictedKrbHost/WIN-Q1IO4I7IPRU.DCLAB.local
RestrictedKrbHost/WIN-Q1IO4I7IPRU
HOST/WIN-Q1IO4I7IPRU/DCLAB
HOST/WIN-Q1IO4I7IPRU.DCLAB.local/DCLAB
HOST/WIN-Q1IO4I7IPRU
HOST/WIN-Q1IO4I7IPRU.DCLAB.local
HOST/WIN-Q1IO4I7IPRU.DCLAB.local/DCLAB.local
E3514235-4B06-11D1-AB04-00C04FC2DCD2/381dfaa1-627f-4bb8-93b3-1da0cc84e89
d/DCLAB.local
ldap/WIN-Q1IO4I7IPRU/DCLAB
ldap/381dfaa1-627f-4bb8-93b3-1da0cc84e89d._msdcs.DCLAB.local
ldap/WIN-Q1IO4I7IPRU.DCLAB.local/DCLAB

As you can see – we are missing the SPN for MSSQL and HTTP (especially if providing icons and OSD via HTTP) – which can be set like this (as an example);
setspn -A MSSQLSvc/WIN-Q1IO4I7IPRU:1433 WIN-Q1IO4I7IPRU
setspn –A HTTP/WIN-Q1IO4I7IPRU.dclab.local

13. Lets go into verifying IIS – as per a quite extensive written article there are some additional topics needed to address to get the final pieces together.

Implement this registry key;

Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\HTTP\Parameters]
“MaxFieldLength”=dword:00065534
“MaxRequestBytes”=dword:16777216

Then restart the WWW-service!

14. According to the same article (as per #13) – we will reverify the IIS-settings. Expand to the default website and lets review the Authentication-settings.

image

Anonymous is set to disabled and Windows Authentication is set to Enabled. There has been some debate regarding ASP.NET Impersonation – this articlecontradicts what I set. It may be due to the fact that our setup is different – SQL is installed on the same server as the App-V Mgt server.  It works if App-V Mgt Server and the SQL server are installed on the same server. If they are not – that might change things. I would suggest to try it with the ability Enabled.

Select Windows Authentication and click Advanced Settings.

image

Select Providers and see this;

image

Remove the two that are there and add the Negotiate:Kerberos instead – now looking like this;

image

In this setup – “Enable Kernel-mode authentication” was needed to be unchecked.

Select the SoftgridManagement and click Authentication. Lets review there whats set;

image

These should be very much the same as for the Default Website.

I reviewed the Windows Authentication Advanced Settings and verified that it was set the same as for the Default Website.

Also – we need to modify the application pool that is used – the Classic .NET AppPool. Since we are using IIS 7.5 – as standard Identity is set to use the ApplicationPoolIdentity. If you attempt to start the App-V Mgt Server Console and connect – you can see a failed login attempt (the dreaded 0000c800 error is only shown from the console itself) by the applicationpoolidentity. Alter this to NetworkService, by choosing AdvancedSettings for Classic .NET AppPool under Application Pools

image

14. Finally – we have arrived within the App-V Mgt Server Console and are connected. We aren’t done entirely yet… Lets do some configuration tasks within the system itself.

Right-click your host and choose System Options – under the first tab you should the UNC-path to your previously shared folder (step 7)

image

Next is to expand Server Groups and locate your server – right-click it and choose Properties.Go to the Advanced-tab. Now, here we have some options that quite often are left untouched. Lets start at the bottom and work our way up…

image

Number of Core Processes means how many running processes will be started on this server and therefore streaming applications to users. No idea what the Max Chunk Size value means. So – are those optimal values? With today standards in performance – you can probably increase the number of core processes a lot – lets say 20? However, no performance gain has been seen in doing so. Lets keep them this way.

image

This is the amount of data that is read by the management server each time a request is made for a package. 512 KB is currently pre-read for each streaming operation. This also seems fairly optimal.

image

These values are never optimal by todays standards. Justin Zarb wrote an article as to why they aren’t – but essentially the Max Memory Allocation should be set to a number that is the amount of RAM you have – apart from the basic resources the OS needs to operate.

One more additional topic – if you have issues with users not receiving applications because their user accounts are part too many Security Groups. Implement this value;

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\SoftGrid\4.5\Server

“MAX_RTSP_HEADER_BYTES”=dword:0000ffff

According to Microsoft – that might help you.

If it doesn’t work (despite all these instructions) – see Aaron Parkers great article.

And if you need reporting – look into this Solution Accelerator.

Not so hard, right?

Updated 2012-08-10;

Actually – I missed some stuff;

There are a couple of new SQL-scripts that are required to be implemented incase you migrate or use a new version of Microsoft SQL Server (anything after 2008 I think..) within the App-V Technet Accelerator Gallery.

Sage Fund Accounting and Drivers

If you are attempting to sequence Sage Fund Accounting and then attempt to start that virtualized instance – you will receive the below error message.

FundAccountingPrinter

If you used App-V 4.6 SP1 – you might have wondered why a driver was not shown in the post-packaging report. It says all is well. Also – Driver Magician didn’t detect it as a third-party printer at all.

If you check Printers and Devices – there isn’t anything directly that relates to Sage MIP Internal Driver, however if you look around the following will show itself;

image

Now – we have located the printer and no way to extract it. Apart from the fact that the installation folder contains this;

image

The contents of the install.log will reveal that a printer was installed – it is called Amyuni Document Converter. Not the Sage MIP Internal Driver. If simply double-clicking install.exe (or executing it from a command-prompt) – that printer will be installed. The Sage MIP Internal Driver will still be missing….

However, if you run a command-line that looks like this (the entire prog-folder was copied to our target computer);

clip_image002

Suddenly – the error message is gone.