App-V 5 and Virtual Extensions

Which virtual extensions within App-V 5 are only available if the package is published globally?

See this table!

I also decided to include a pointer if the target OS is relevant when sequencing. If it says yes, the package should be created on the same bitness as the target OS.

 

Virtual Extension Target OS specific Global only?
Shortcut No No
File Type Association No No
URL Protocols Yes No
AppPaths Yes No
COM Mode No No
Software Client Yes No
Application Capabilities Yes Yes
Context Menu Handler Yes No
Drag-and-drop Handler Yes No
Data Object Handler Yes No
Property Sheet Handler Yes No
Infotip Handler Yes No
Column Handler Yes No
Shell Extensions Yes No
Browser Helper Object Yes Yes
ActiveX Object Yes Yes

 

http://blogs.technet.com/b/appv/archive/2013/01/03/microsoft-application-virtualization-5-0-integration.aspx

App-V 5 and Citrix

There is a great new whitepaper released by Microsoft dealing with different deployment scenarios when it comes to Citrix products. As Citrix announced the end of life for their Application Streaming – quite a few people have started to migrate over to App-V 5.

Unfortunately – App-V 5 is a bit more work (infrastructure wise) to get started and at the moment it is a bit slower aswell.

There isn’t any promise by Microsoft that this has improved in App-V 5.0 SP2, however thinking logically one could assume that all customer cases raised before App-V 5.0 SP2 will hopefully have made the product better.

So, what can we do for all the environments where we today suffer from a poor launch or publishing refresh experience?

1. Disable background staging of the registry to on-demand.

This may reduce the CPU-load!

Set the following registry key;


HKEY_LOCAL_MACHINE\Software\Microsoft\AppV\Subsystem

Value; NoBackgroundRegistryStaging

DWORD: 1

Source: App-V: On Registry Staging and how it can affect VDI Environments

2. Improve streaming performance by using IIS caching

Ingmar has created a great article on howto enable IIS to cache App-V files (which usually are large and thereby excluded from cache).

See his complete article; Microsoft App-V 5.0 – Streaming via HTTP

3. Use SMB 3.0 if you aren’t using a web-server.

Its fast. See the proof here at Xenapp-blog – Citrix XenServer – Make your network 10x faster or at the Citrix-blogs. Aidan has explained even more benefits for Windows Server 2012 R2 which kicks up the performance even more.

Migrating away from the old legacy (yes, they are legacy now) Windows Server 2008 R2 servers to take the benefit of even faster performance when it comes to file-transfer.

A great collection of Microsoft resources;

Updated Links on Windows Server 2012 R2 File Server and SMB 3.02

4. Use Global Refresh and disable User Refresh

Once the application is actually published to a client the performance impact isn’t usually that bad with App-V 5. If you deploy applications globally to a machine the provisioning part is moved away from the user context and to the machine context. By default though a option is set to perform a Global Refresh once a user logs on. If that is disabled, we completely remove that Publishing operation from the logon process.

Sample command-line,


Add-AppvPublishingServer –Name Server -URL <a href="http://server:80">http://server:80</a> –GlobalRefreshEnabled $true –GlobalRefreshOnLogon $false -GlobalRefreshInterval 1 –GlobalRefreshIntervalUnit Day

5. Set App-V specific process within the LogOffSysCheckModules Registry key

This is an oldie, but still valid. Citrix maintains a list of processes that it doesn’t consider to worth keeping the session alive for. Usually what happens is that sessions are just never logged off and the servers get full, without any active workers on it.

Process to include in the key;


AppVStreamingUX.exe,AppVSHNotify.exe

Source;

Tips/Tricks for Using App-V Integration with XenDesktop 7.0

App-V 5.0 SP2 and pending removal / update

A new feature, that is only announced on Thamim Karims blog, is the pending state of the App-V 5.0 SP2 client. Previously I covered the new virtual extensions, the user interface removal and new config possibilities (packagestoreaccesscontrol, enable publishing refresh ux) as some great new possibilities for App-V that will greatly benefit everyone, however something that snuck upon is very late (as in when it went public) is the pending state.

So, what is a pending state for publish and unpublish?

Let’s review the output of PowerShell for our packages;


Get-AppvClientPackage -Name Microsoft*

PackageId            : a4b24f80-7fda-4735-86a2-6399fb77b6eb
VersionId            : 7ca886ab-66b9-45d5-b179-ae47ad71ff47
Name                 : Microsoft Frontpage 2003
Version              : 0.0.0.1
Path                 : D:\storage\MSApp-V_5.0 SP2\Microsoft Frontpage 2003\Microsoft Frontpage 2003.appv
IsPublishedToUser    : False
UserPending          : False
IsPublishedGlobally  : True
GlobalPending        : False
InUse                : False
InUseByCurrentUser   : False
PackageSize          : 364618049
PercentLoaded        : 100
IsLoading            : False
HasAssetIntelligence : True

As you can see there is the UserPending and the GlobalPending. I don’t think they relate to this, but they are an indication that something is up. A few other topics that are worth covering is the InUseByCurrentUser and InUse. These two (if set to True) gives the admin an inkling if the package is locked and can therefore not be updated – very frustrating if you want to push out updates.

Once we use the application – the state of those two values toggle.

image

In a pre-SP2 world, this would stop the package from beeing updated and we would simply have to force our users to close the application.

In a post-SP2 world, the App-V client gives us only a warning and an indicator that something will happen at a later stage;


Get-AppvClientPackage -Name Microsoft* | Unpublish-AppvClientPackage -Global
Unpublish-AppvClientPackage : The target package is currently in use. The Unpublish operation will be attempted at a later time
Operation attempted: Unpublish AppV Package.
AppV Warning Code: 0200000515.
Please consult AppV Client Event Log for more details.
At line:1 char:42
+ Get-AppvClientPackage -Name Microsoft* | Unpublish-AppvClientPackage -Global
+                                          ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo          : InvalidResult: (:) [Unpublish-AppvClientPackage], ClientWarning
+ FullyQualifiedErrorId : UnpublishPackageWarning,Microsoft.AppV.AppvClientPowerShell.UnpublishAppvPackage

When is a later time?

It seems that if a package is published globally a later time means a reboot, and if the package is published to the user a later time means a logoff / logon operation.

Once a user logs on again, or if the computer is restarted the application is gone!

Since we get a warning, and not a success message, I would _assume_ that SCCM would need an update to handle this and that the native infrastructure can cope with this aswell.

FYI;

UserPending and GlobalPending didn’t toggle at all during my testing. No idea what they are used for?

App-V 5 and PowerShell

Some links to a few lines of PowerShell code that makes life easier for various tasks in App-V 5.

AppV+Powershell

App-V 5 Client PowerShell Commands

Create friendly names for packages

App-V 5 Cmdlets (by VirtualEngine)

PowerShell Extract Item from ZIP (AppV)

PowerShell script to test App-V 5.0 Packages

App-V 5.0: PowerShell VE Launcher

App-V 5 Pre-cache script

App-V 5 PowerShell One-Liners – Adding and Publishing App-V Client Packages

App-V 5 PowerShell One Liners – Adding and Publishing A Folder of App-V Client Packages

New! Powershell in App-V 5; some example scripts

Converting App-V 4.x packages to App-V 5.0

How to use PowerShell to find packages in App-V v5 client connection groups

Migrating packages from App-V 4.x to App-V 5.0

PowerShell Delete App-V Cache

Sequence Articulate Storyline

A few hickups while playing around with Articulate Storyline and App-V 5. Unfortunately all this knowledge about howto sequence Storyline is based on a trial edition, however I don’t see a problem to make this work with a licensed edition.

Let’s get started!

Prerequisites

Setup your packaging VM. See my previous article about the topic to see our starting point.

You can get the trial-version from Articulate, and in addition to the installer you will also need Adobe Flash Player (ActiveX)

Sequence

Fire up the App-V Sequencer. During my installation the PVAD was the installation directory of the software. Adobe Flash Player (ActiveX) was actually installed after Storyline was installed, but before the initial launch. Since an initial launch was performed it will expire the trial once you deploy it to a client and force the user to activate.

Deploy

Deploy it to a client that matches your packaging VM in terms of architecture and prerequisites installed. Then you are done!

SNAGHTML4196372e

Visual C++ 2013 Silent install and MSI

You can download the Visual C++ 2013 Redist editon and take a peak at how to deploy this prerequisite software.

If running executing the file with a /? you will receive the prompt below;

vcredis_x86.exe /?

SNAGHTML2e8eeacf

/install / repair and /uninstall will perform its respective action. /layout will extract the vcredist_x86.exe to the folder specified. No idea what the purpose is for that one?

If you install this manually there will be three log-files created in %TEMP%. They have a prefix of; dd_vcredist_x86

Reading the log-files shows us that the MSI-files will be extracted in a GUID-location in this folder;

C:\ProgramData\Package Cache\

ProductCode for Minimum; {13A4EE12-23EA-3371-91EE-EFB36DDFFF3E}

ProductCode for Additional:{F8CFEB22-A2E7-3971-9EDA-4B11EDEFC185}

A sample command-line to install them;

vcredist_x86.exe /install /quiet /norestart /log %TEMP%\vcredist_2013_x86.log

If you want to deploy the MSI-files you can use the same property as documented for VC++ Redist 2012;

ADDEPLOY=1

Deploy Internet Explorer 11

All you need to successfully deploy Internet Explorer 11

 

Plan, Customize and Build with the IEAK 11
http://technet.microsoft.com/library/dn338134.aspx

IEAK
http://www.microsoft.com/en-us/download/details.aspx?id=40903

Troubleshooting a failed installation of Internet Explorer 11
http://support.microsoft.com/kb/2872074

IE 11 FAQ for IT Pros
http://technet.microsoft.com/library/dn268945.aspx

Prerequisite updates for IE11
http://support.microsoft.com/kb/2847882

Log-file for the installation;
%WINDIR%\IE11_main.log

SCCM 2012, Software Center and applications made available to users

As noted quite early in the marketing for SCCM 2012 there was a change on how users were presented with available applications. The fundamental change is that any software made available (as opposed to required) were only presented in the new Application Catalog. Microsoft posted a blog-article detailing the different scenarios that could happen, which presents a good overview table on what is seen where when deployed to different resources.

As opposed to start communicating users to either use Application Catalog or Software Center depending on how we have decided to target the users or the computers within SCCM, a better way would be to leverage the traditional method of targeting computers. If targeting computers any software made available will be presented in Software Center, however SCCM 2012 has also been released with the mindset to start handling users – and not computers.

What to do?

Use SCCM to target software to the user’s devices. This would avoid the following topics in the forums; user-based available application not showing up in Software Center by design?!

Previously a few blog-articles have discussed this method for targeting Software Updates and a few rare occasions have shown up with no specific purpose.

To boil it down we will be leveraging the fact that SCCM can track users primary devices and thereby maintaining a relationship between devices and users. This method will allow us to query the database for the following information;

All the devices for users belonging to AD-group X.

Create a collection with the below query and this will allow you to provision software to users, but target their computers.

select SMS_R_SYSTEM.ResourceID,
SMS_R_SYSTEM.ResourceType,
SMS_R_SYSTEM.Name,
SMS_R_SYSTEM.SMSUniqueIdentifier,
SMS_R_SYSTEM.ResourceDomainORWorkgroup,
SMS_R_SYSTEM.Client
from SMS_R_System
JOIN SMS_UserMachineRelationship ON
SMS_R_System.Name=SMS_UserMachineRelationship.ResourceName
JOIN SMS_R_User ON
SMS_UserMachineRelationship.UniqueUserName = SMS_R_User.UniqueUserName
WHERE   SMS_UserMachineRelationship.Types=1
AND   SMS_R_User.UserGroupName="DOMAIN\\AD-GROUP"

Apply hotfixes during task sequence

If you want to apply hotfixes as part of a task sequence there are of course numerous ways to achieve this. Using PowerShell, MDT 2012 U1 (soon to be 2013??) with SCCM 2012 can make this look a lot prettier with just a few lines of code.

So, lets set this up.

1. First of all we need a script, named hotfixes.ps1. The code looks like this;

$scriptPath = split-path -parent $MyInvocation.MyCommand.Definition
$folder = $scriptPath
$total = gci $folder *.msu | measure | Select-Object -expand Count
$i = 0
gci $folder *.msu | foreach {
$i++
WUSA ""$_.FullName /quiet /norestart""
Write-Progress -activity "Applying Hotfixes" -status "Installing $_ .. $i of $total" -percentComplete (($i / $total) * 100)
Wait-Process -name wusa
}

2. Collect the hotfixes necessary into a folder. Place the script in the root, and the hotfixes in a sub-folder named “hotfix”. All hotfixes must be of the .MSU-kind.

image

3. Create a package of this to make the files available within the SCCM 2012 infrastructure

image

4. Create a new MDT 2012 Update 1 task sequence. Add the following steps;

image

As you can see below we set our script to be executed and reference the package which contains the updates

image

5. Deploy the task sequence to a computer and verify the results;

image

Looks nice? Well, the script is partly built on the ideas of Niklas Åkerlund, a fellow Swede, on howto install multiple Windows hotfixes. Using a forum-post response by Michael Niehaus I gathered that it would be rather simple to output it more nicely and provide insight into progress using the task sequence progress bar.

App-V 5 and your first SQL Server Report

There are quite a few articles out there to setup and configure App-V 5 and the Reporting server along side SQL Server Reporting Services.

See this list on howto get started;

About App-V 5.0 Reporting

App-V 5.0 Reporting Setup and Query

App-V 5.0 Client Reporting – Client Setup

App-V 5.0 Reporting Server – missing prerequisites

General SQL Server Reporting Services installation tutorial;

Install Reporting Services

All of the above deals with getting the server up and running, the client to send data and to ensure that this is properly processed into the database.

I have spotted one query against the database on – which shows some basic information about application usage using SQL Management Studio.

Where are the reports? Well – SQL Server Reporting Services isn’t very friendly for a novice and to get started might be very daunting. So, here is a starting point! Use the above information to get started – have a server setup and a client (or more) reporting in.

To reach the home-page of SSRSS browse to;
http://<yourserver>/Reports/Pages/folder.aspx

This will present the homepage of the SSRS

image

As you can see I have multiple reports setup and ready to go. Lets get you started!

1. Click New Data Source

2. Setup the new connection. Most likely it will look something like this in a small lab environment.

Fields are as follows;

Name; AppVReports

Connection String; Data Source=localhost;Initial Catalog=AppVReporting

AppVReporting is the default database-name for the App-V Report database. Localhost should match your SQL Server hostname. Set Windows Security to use your own windows credentials to authenticate (or the user who access the reports). Click Test Connection to test the connection. Once all is set and done – click OK!

image

3. Download and upload the report

Download the report Application  Usage for user.

Select the upload-file;

image

Locate the downloaded file and upload it into the SSRS repository.

4. Edit the report to fit your environment

Press the menu for the report and and select Edit in Report Builder

image

5. Edit the Data Source

You can choose to delete the Data Source, or edit the existing one. In the end – you should point to the previously created Data Source.

image

If you select Add Data Source the menu looks like this;

image

As you can see – the previous created Data Source is visible in the list.

Click OK to finalize. Select Save and close the Report Builder.

6. Click the Application Usage for user

7. Enter the user you are interested in to display the report.

For example MYDOMAIN\username. Click View Report.

image

8. Voila!

image

 

Tim Mangan has made some reports available on his site, TMUrgent. Check them out!

2014-05-06 – Microsoft made additional reports available!