App-V 5.0 SP2–AppvClientConfig

imageThere are a few new configuration settings that can be exposed via Get-AppVClientConfiguration. Looking at the output of the PowerShell cmdlet on the side we can spot four new in total;

PackageStoreAccessControl
EnablePublishingRefreshUX
ProcessesUsingVirtualComponents
EnableDynamicVirtualization

PackageStoreAccessControl can restrict users from browsing, and starting applications from, the PackageInstallationRoot to locate any published applications and gain access to something that was not intended for them.

EnablePublishingRefreshUX aims at providing a user interface, a progress bar, for the publishing refresh operation. Since the new architecture for App-V 5 has been put into production this is a topic that has surfaced that the publishing refresh is slower compared to App-V 4.X and interrupts the user. As part of improving that experience there are two changes – one is to provide the user with a visual indicator on how far along the progress is. The second part is that the start menu is only refreshed for every 5 applications that are published – to avoid it refreshing to often.

The Sync-AppVPublishingServer also has a –HideUI to give the option to not present the progress bar when performing a sync.

ProcessesUsingVirtualComponents is a new setting that seems to relate to the ability to provide the new shell extensions and the browser helper objects. Its not documented, but it seems to provide a list of processes that can access the virtual environment to utilize resources part of the package.

Sample value; ProcessesUsingVirtualComponents         {%SystemRoot%\explorer.exe, %Program…                                  

EnableDynamicVirtualization simple toggles the ability to use the virtual extensions on or off.

App-V 5.0 SP2–Shell Extensions

Since I first started looking at App-V (4.1) back in 2006 – there was one feature that has always been wished upon.

Right-click menus – aka shell extensions.

Aaron Parker has previously written a hack which could resolve this, but its not been widely used and requires a lot of work but does not provide all functionality. The initial idea came from VMware and howto leverage the MSI-file to “workaround” the issue

image

Why? Since day 1 – part of the App-V training has been to sequence a “simple” application. Such as WinZip, WinRar or any other common compression utility part of any standard desktop deployment. However, when deploying this in production a single topic always surfaced and gave App-V a bad reputation within all companies. Shell extensions were not supported as an extension. In essence – the knowledge the operating system had about any existence of a virtual application was shortcuts and file type associations. It has taken from 2006 and up until App-V 5.0 RTM in 2012 until this changed in anyway. App-V 5.0 introduced major feature changes in this area and this of course brought a lot of hope up.

This hope has now turned into reality.

I can not praise Microsoft enough to finally provide us with this feature request.

As you can see – both WinRar and Beyond Compare have been deployed to a client, and as soon as a right-click menu is presented with the options – the package is in use.

What do you need todo during sequencing to make this work? Nothing – it just works!

Finally – we can truly aim for that 100% virtualized applications scenario being in reach for any environment. Its not quite there, but it is not far away.

New extensions are;

ActiveX controls
Browser Helper Object
Context Menu Handler
Drag-and-drop Handler
Drop target handler
Data object Handler
Property sheet handler
Infotip handler
Column

App-V 5.0 SP2 – Visual C++

Since App-V 4.5 has been released into the wild there has been a couple of things I personally have been preaching to the community to get a high level of successful virtualized applications. One of these things is the deployment, and active updating of, Visual C++ Redistributable. All in all there is about 22 different versions to be deployed both onto any sequencing machine and any potential client. See the previous article Setup a VM for Packaging for a complete list that contains download links and in which order I install. them. Tim Mangan has gathered a more complete list that contains a lot more information about each and every version of the Visual C++ Redistributable. Now, this is all talk and no evidence that the native installation of all these different prerequisites will actually make life easier for anyone and perhaps just introduce a risk for us when deploying additional components natively.

I wrote a FAQ response on Aaron Parkers App-V 4.X FAQ regarding if you can virtualize VC Redist or .NET Framework – which conclusive says NO. In addition to the above generic response, I have personally dealt with SAP GUI (7.1 / 7.2), Adobe Photoshop CS6 (most likely applicable to all CS 6 software), Paint.NET, the error message 000036B1 and Autodesk Navisworks Freedom when it comes to recipes and specific error messages that all go back to missing Visual C++ Redistributable components as a root cause.

This is now a thing of the past.

App-V 5.0 SP2 changes this drastically as it will detect and virtualize all versions of Visual C++. In addition to this – the App-V 5.0 SP2 client will now detect VC++ Redist components part of packages produced in earlier versions of the App-V 5.0 sequencer and also allow those to be part of the virtual environment.

How does this work? It just works!

When you sequence a software, no “special” actions are necessary, no additional steps are required. Once you have completed the installation a report will inform you that the components are detected;

image

The details of the report looks like this. It tells us which components have been detected.

image

What does this mean for the previous written best practices?

It’s all in the trash

We can move back to a “lowest common denominator” for the Visual C++ Redistributable components and make sure that as much as possible are part of our packages. Stay tuned for an updated article on that!

One setting located under Options on the sequencer;

image

App-V 4.6 Manual uninstall

Did you ever get the dreaded error Error 25028.The Application Virtualization Client service could not be configured from the App-V installer? It should be effective enough to perform a manual cleanup according to the previously blog-post article by Microsoft, however there are some minor steps that eases the process in addition to what has been communicated.

A summary of steps according below;

Execute the following commands to remove the services;

sc delete sftvsa 
sc delete sftlist 
sc delete sftplay 
sc delete sftfs 
sc delete sftvol

Delete the following folders;
C:\ProgramData\Microsoft\Application Virtualization Client
c:\program files (x86)\microsoft application virtualization
%public%\documents\softgrid client
%appdata%\softgrid client
%localappdata%\softgrid client

For an App-V 4.6 SP2 client, you need to remove this registry entry;

HKEY_CLASSES_ROOT\Installer\Products\C38408D5792D40E4E9FDDD8525E15956

It may be different for an App-V 4.6 SP1 client, but you can easily find it by searching for “Virtualization”.

Reboot the client and the installation should run cleanly afterwards.

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

Identify App-V 5 errors

App-V 5 has provided us with many granular logs to identify issues, but when troubleshooting there needs to be an overview of errors. For the last few days quite a lot of effort on my own part has been in browsing through the logs, so as opposed to manually traverse individual logs or filtering all of them we can leverage PowerShell to identify errors quite easily. The below piece of code will traverse all but one of the logs and quickly identify any errors.

#Nicke Källén – 2013-05-08
#Define App-V logs
$appvlogs = Get-WinEvent -ListLog *AppV* -Force
#Define start-time - suggested time yesterday
$starttime = (Get-Date).AddDays(-1)
#Define end-time - now
$endtime=[datetime]::Today
#Set Culture to en-US, otherwise Message goes blank
$orgCulture = Get-Culture
[System.Threading.Thread]::CurrentThread.CurrentCulture = New-Object "System.Globalization.CultureInfo" "en-US"

#Loop through all log-files
foreach ($log in $appvlogs) {
write-host “Log; ” $log.LogName
#Skip operational log as it most contains informational messages and is heavy
if ($log.Logname -ne "Microsoft-AppV-Client/Operational") {
#Select only errors (level = 2) and select time and message of the event
Get-WinEvent -FilterHashTable @{Logname=$log.LogName;starttime=$starttime;endtime=$endtime} -Oldest -ErrorAction SilentlyContinue| ?{$_.Level -eq "2"} | Format-List TimeCreated, Message
}}
# Reset Culture to orginal
[System.Threading.Thread]::CurrentThread.CurrentCulture = $orgCulture

App-V 5; Enable or disable all debug-logs

Been diving into the App-V 5 logs for a few days and got tired of enabling the debug and analytic log files. Made a small sample to enable them in a loop;

Enable all App-V 5 logs;

##Nicke Källén 2013-05-08
##Enable all logs
$appvlogs = Get-WinEvent -ListLog *AppV* -force | Where-Object {$_.IsEnabled -eq $false}
foreach ($logitem in $appvlogs) {
     write-host “Log enabled: ” $logitem.LogName
     $logitem.IsEnabled = $true
     $logitem.SaveChanges()
}
##Disable all logs
$appvlogs = Get-WinEvent -ListLog *AppV* -force | Where-Object {$_.IsEnabled -eq $true}
foreach ($logitem in $appvlogs) {
if (($logitem.LogName -ne "Microsoft-AppV-Client/Admin") -or ($logitem.LogName -ne "Microsoft-AppV-Client/Operational") -or ($logitem.LogName -ne "Microsoft-AppV-Client/Virtual Applications"))
{
     write-host “Log Disabled: ” $logitem.LogName
     $logitem.IsEnabled = $false
     $logitem.SaveChanges()
}}

No error handling is available, this is just a quick start to avoid loads of clicking.

(2013-05-05 – Added the Where-object to avoid getting errors…)