App-V 5 and sequencing platform

Microsoft best practice states that you should match your sequencing platform to your target platform. App-V has always given us an extremely well working platform to avoid that and still does. However, we have a game changer; Extension Points

What are extension points? More integration into the operating system to allow users to use their virtual applications in a manner they expect that it should simply work.

Did you just pop-in a music CD (not really ?) and had the default media player virtualized?

In App-V 4.X that would cause an issue due to the fact that the operating system had no awareness that you had a media player. Autoplay was not a supported extension point within App-V 4.

image

As you can see there are several possible choices in the above list on what todo when an Audio CD is inserted. If the application is virtualized – in an App-V 4.X environment it would not be visible in the above list.

App-V 5 changed the game and extended the list to support this scenario and much more. However, there is a new found reason of actually doing what Microsoft has been telling us todo all along.

Your sequencing platform should match your target platform.

For Windows 7 64-bit, you should sequence on Windows 7 64-bit.

In App-V 5 this is even more valid as several extension points are not following along if you attempt to sequence on a 32-bit platform and deploy to a 64-bit platform.

App-V 5 Modify a shortcut

When you create a new package and deploy it, there usually are some things that might resurface after the initial testing of a package. Such details might be the placement and name of a shortcut.

If you open an existing package in the sequencer you have three options;

image

Select Update Application in Existing Package will present you with a stripped version of the sequencing wizard. Aiming for the Edit Package will head you straight to tab-based part of the wizard where we can review and edit the package on a more detailed level;

image

Ponder this image above for a few seconds and lets continue with the Add New Application option.

Selecting the Add New Application is the route of upgrading packages that I personally recommend. The reason are simple;

There are no options removed while performing the updated sequence.

The Edit Package route (obviously) takes us to the tab-based edit mode and doesn’t allow us to capture any additional installers.

What might havechanged in the App-V 5 sequencer as the ability to edit and alter shortcuts actually shows up in the Edit-mode after you have finished either Update Application in Existing Package or Add New Application and choose Customize. The below tabs can be seen. For some reason – Shortcuts and FTAs isn’t visible when selecting Edit, but for the rest of the possible routes the full view of tabs is visible.

image

There seems to be “light” Edit and “advanced” Edit. Advanced Edit seems to only be available by strolling along the two wizard-based routes, where as light Edit can be directly accessed when opening a package. Light Edit does not allow you to alter shortcuts and file type associations.

Deploy the App-V 5 client with SCCM 2012

Application Virtualization 5 can be deployed with SCCM 2012 quite easily, but there are some prerequisites that needs to be sorted out and as a good practice several Visual C++ needs to be natively deployed. First of all – we need to collect all the prerequisites

Windows Management Framework 3.0
Visual C++ 2005 SP1 ATL Security Update
Visual C++ 2005 SP1 MFC Security Update
Visual C++ 2008 SP1
Visual C++ 2008 SP1 ATL Security Update
Visual C++ 2008 SP1 MFC Security Update
Visual C++ 2010 SP1
Visual C++ 2012
.NET Framework 4.5
Microsoft Security Advisor: Insecure library loading could allow remote execution

Next step is to extract all MSIs and / or any MSU files. Using 7zip most of the above executable files can be extracted by simply opening it in 7zip. Others might require a switch. See this as an example for VC++ 20;
Extract MSI from Visual C++ 2012 Redistributable

Next is to download the exported SCCM Application;
AppV5.zip

Within SCCM 2012 you simply open the applications node, right-click and choose Import Application;
image

After that you locate the downloaded ZIP-file;

image

After some workloads – all the applications will be defined.

Some words before you get started;

You need to test this within your environment. Your computers may reboot. It may not be the desired configuration. There may be specific configurations which aren’t tested. Test this and do it thoroughly within a lab-environment.

App-V 5 Client Reporting–Client Setup

App-V 5 provided the option to separate the reporting that the App-V Client enables from both SCCM and App-V Management server, and it even makes it possible to use with a standalone deployment using Powershell and MSI.

I will not provide a guide on howto setup the server components, it’s a separate topic and shouldn’t be to complex. However, configuring the client can be a bit tricky, at the same time it is very easy to verify that it is setup properly.

Configure it through Powershell;

After you have imported the App-V Client Powershell module;

Set-ExecutionPolicy RemoteSigned
Import-Module AppVClient

You can access the current configuration of the App-V Client;

Get-AppVClientConfiguration

You can see that per default – all configuration relating to reporting is blank. Use the below command-line to setup the functionality;

Set-AppvClientConfiguration -ReportingEnabled 1 -ReportingServerURL urlforyourserver -ReportingStartTime 0 -ReportingRandomDelay 10 -ReportingInterval 1

The above will enable reporting at 00:00 with a 10 minute randomized interval to not overload the server and update the server every 1 day. The server-url is as provided for –ReportingServerUrl (urlforyourserver).

This will actually setup a Scheduled task – which you can easily verify (apart from getting the set configuration using the Powershell example above);
image

I assume that you can tweak the time-intervals on your own.

This is quite easy and is very well documented at Technet.

You can also use Group Policy to provide the above configuration; ADMX-template

App-V 5 Powershell Sequencing

Yeah – its pretty cool. Create a folder with the installation file named c:\source. As sample media VLC will be used. The installation-file is called; vlc-2.0.2-win32.exe

Run the following from Powershell to setup the sequencer cmdlets.

Set-Executionpolicy RemoteSigned
Import-module appvsequencer

Run the below to create two directories and then run through the installer.

$package = 'VLC'
new-item c:\source\$package -type directory
new-item c:\$package -type directory
New-AppvSequencerPackage -Name $package -Path c:\source\$package -Installer C:\source\vlc-2.0.2-win32.exe -PrimaryVirtualApplicationDirectory C:\$package –FullLoad

The final package gets created within c:\source\VLC

App-V 5 and Drivers

Virtualizing applications using App-V 4.X and even App-V 5 does not allow to virtualize drivers, as they are injected directly into the Windows kernel (simplified, of course). Using App-V 5 there has been new progress in easing the delivery of both driver and the application. With a few exceptions, drivers can often be easily extracted from the source-files or the installed application itself. Looking at Dymo Label Writer – you can see that there is a sub-folder within the installation directory called drivers.

image

Reviewing the contents you can see that there is an executable file named dpinst.exe and if you run dpinst.exe /?, the following help is shown.

dpinst.exe: installs and uninst alls driver packages. By default, the tool searches the current directory and tries to install all dri ver packages found.&lt;/pre&gt;<br />Usage: dpinst.exe [/U INF-file] [/S | /Q][/LM][/P][/F][/SH][/SA][/A][/PATH Path][/EL][/L LanguageID][/C][/D][/Lo gTitle Title][/SW][/? | /h | /help]<br /><br />/U INF-file    Uninstall a driver package (INF-file).<br /><br />/S | /Q        Silent (Quiet) mode. Suppresses the Device Installation Wizard and any dialogs popped-up by the operating system.<br /><br />/LM    Legacy mode. Accepts unsigned driver packages and packages with missing  files. These packages won't install on the latest version of Windows.<br /><br />/P     Prompt if the driver package to be installed is not better than the cur rent one.<br /><br />/F     Force install if the driver package is not better than the current one.<br /><br />/SH    Scans hardware for matching devices and only copies and installs those drivers for which a device is present. Only valid for Plug and Play drivers.<br /><br />/SA    Suppress the Add/Remove Programs entry normally created for each driver  package.<br /><br />/A     Install all or none.<br /><br />/PATH Path     Search for driver packages under the given path.<br /><br />/EL    Enables all languages not explicitly listed in the XML file.<br /><br />/L LanguageID          Tries to use the given language in all UI. Useful for l ocalization tests.<br /><br />/SE    Suppress the EULA.<br /><br />/C     Dump logging output to attached Console (Windows XP and above).<br /><br />/D     Delete driver binaries on uninstall.<br /><br />/SW    Suppresses the Device Installation Wizard, the operating system might s till pop-up user dialogs.<br /><br />/? | /h | /help        Shows this help.

Once you wrap up your App-V 5 package you can see that there is a file called DymoLabel Writer 8.4_DeploymentConfig.xml. This contains the setup for a package once its added to a computer and can be used to provide an elevated way of performing actions when deploying a package. Using Powershell or SCCM 2012 this deployment file can be used to provide additional configuration when deployed.

Lets leave the file intact for the most part – it contains any options that were set during sequencing as a standard sample file. Find the section;
<!– Machine Scripts Example – customize and uncomment to use machine scripts –>

Adding this;

&lt;!-- Machine Scripts Example - customize and uncomment to use machine scripts --&gt;&lt;/pre&gt;<br />&lt;MachineScripts&gt;<br /><br />&lt;AddPackage&gt;<br /><br />&lt;Path&gt;C:\media\Drivers\dpinst.exe&lt;/Path&gt;<br /><br />&lt;Arguments&gt;/s&lt;/Arguments&gt;<br /><br />&lt;Wait RollbackOnError="false" Timeout="30"/&gt;<br /><br />&lt;/AddPackage&gt;<br /><br />&lt;/MachineScripts&gt;

The script explains itself. When the package is added – it will be executed. The timeout is 30 seconds and it will not rollback the package deployment if it fails.

To add it using Powershell (SCCM does this automatically for you), fire up a Powershell console and start coding. First, allowed remotely signed scripts to run

Set-ExecutionPolicy RemoteSigned

Import the App-V Client module

Import-Module AppVClient

Add the package with the configuration file and then publish it in a globla-context

Add-AppvClientPackage '.\DymoLabel Writer 8.4.appv' -DynamicDeploymentConfiguration '.\DymoLabel Writer 8.4_DeploymentConfig.xml' | Publish-AppvClientPackage –Global

If you haven’t enabled package scripts to run, you will get this error in the App-V Operational Log;

Log Name:      Microsoft-AppV-Client/Operational<br />Source:        Microsoft-AppV-Client<br />Date:          10/15/2012 11:05:18 PM<br />Event ID:      4004<br />Task Category: Execute Embedded Scripts<br />Level:         Information<br />Keywords:      Embedded Scripting<br />User:          APPVCLIENT\AppV Win7 x86 Client<br />Computer:      appvclient<br />Description: Running machine script defined in package {2b838582-4925-4a53-99a2-0aaf216df77d} for event AddPackage. Script execution was initiated by User Account: 'S-1-5-21-1739582198-759874057-429165515-1000'; command line: 'C:\media\Drivers\dpinst.exe /s'.

You can enable scripts to run for the App-V Client via Powershell;

Set-AppVClientConfiguration –EnablePackageScripts 1

This shows up under Programs and Features once we are done;

image

Successful sequencing (or an interview with the guy who solved the pdapp.exe crash)

[repost]

imageTo continue to highlight successful sequencing and the efforts and mindset that goes into it – here comes the a second interview. Fellow Microsoft MVP, who I actually have met in person, Tsuneyuki Mitsugi from Japan who posted a very specific fix for resolving a PDApp.exe crash – quite common when sequencing several Adobe applications. Tsuneyuki unfortunately doesn’t speak English and therefore this interview is only possible by using the powers of interpretation and Google Translate. Even though there is a barrier of lacking a common language, lets hope that everyone can enjoy the below answers and understand the importance of sharing knowledge.
(another fix by Tsuneyuki for Quicktime)

 

Hi Nicke Källén san

It answers your question.
Please E-mail when you do not understand the translation. English

>How long experience do you have of App-v (or softgrid?) and what type of environments have you been working with  (TS, desktop)?
From 2005, since it was Softricity Softgrid – working with a lot of desktops.
Original;
It is from 2005. It does from Softricity SoftGrid. There are a lot of Desktop.

>What communities are you active in? Any public blog / forums that you might show up in?
It acts in a Japanese Microsoft forum of App-V
Twitter @tunemicky
http://social.technet.microsoft.com/forums/ja-JP/appvja/threads/

>What is installed on your computer? Whats the must-have application you always use?
Microsoft Office2010(Excel,Word,PowerPoint,Access,Outlook)
Visual Studio 2010
Firefox
Google Chrome
IE9

>Since you posted a recipe for Photoshop Elements – lets ask how that came about
>How long did it take?
3 takes
First time is fail
Information on the forum was found by the Google

Second time is succuess
It moved when executing it based on the information.
But PDapp.exe crash issue happen
Third time is success perfectory
It moved without trouble when the DLL version of the module of the third error was updated and it corresponded.
It fed back to the forum.

>What problems did you experience and how did you find the solutions to them?
Because PDapp.exe had crashed by the application error, the event viewer was confirmed.
Side by Side (SxS) error had occurred.
The “Resource Hacker” confirmed PDapp.exe.
http://angusj.com/resourcehacker/
Embedded Application Manifest file is setting fixed version Microsoft.VC90.CRT Runtime requirements
It is difference version dll.
Next I check it from c:\Program Files\Common Files\Adobe\OOBE\PDApp\core\Microsoft.VC90.CRT files version
Next step
I check it from Q:\<PACKAGE_ROOT_DIR>\VFS\CSIDL_PROGRAM_FILES_COMMON\Adobe\OOBE\PDApp\core\Microsoft.VC90.CRT
This problem is that perhaps, DLL of the version difference is in the Microsoft.VC90.CRT folder.

>Any special tools in use while troubleshooting?
Sysinternal Tools
SoftGrid Sequencer version 4.1.0.56
version 4.1.0.56 sequencer is not generation *.config files , Microsoft.VC90.CRT folder
Because it sequencer version not support SxS

>How many applications have you sequenced?
over 200 apps

>Was the solutions above mostly based on experience or from the general documentation of MS / elsewhere?
I read MS documentation English ,Japanese
Aaron Parker’s Blog
http://blog.stealthpuppy.com/appvrecipes/

SoftGridGuru
http://www.softgridguru.com/

AppDeploy.com
http://www.appdeploy.com/

>How come you decided to share your solution?
It acts in a Japanese Microsoft forum of App-V
http://social.technet.microsoft.com/forums/ja-JP/appvja/threads/

>Any special thanks you wish to send-out?
Aaron Parker
Aaron Parker’s Blog!! very nice

>What improvements do you wish to see in app-v?
Not generation *.config files , Microsoft.VC90.CRT folder!
like a version 4.1.0.56 sequencer
it is not generation *.config files , Microsoft.VC90.CRT folder
Because it sequencer version not support SxS

best regards
@tunemicky

SAP GUI and App-V

A couple of notes on howto sequence SAP GUI successfully within Application Virtualization 4.6. This requires that you know howto install SAP GUI. This recipe will not contain the steps to install SAP GUI. It will only contain App-V specific parts. This recipe is based on SAP GUI 7.2

This is not for anyone who does not know howto install and configure SAP GUI and all its prerequisites.

I am not kidding on that part – if you have questions on the below steps, don’t try this.

Pre sequencing

Ensure you have a clean sequencing machine with no Microsoft Office components installed.

Run the following command;

REG ADD HKCR\CLSID\{00020820-0000-0000-C000-000000000046}\InprocHandler32 /f
REG ADD HKCR\CLSID\{00020820-0000-0000-C000-000000000046}\InprocServer32 /f

This is prep work to resolve exports to Excel and the Excel-in-place feature – especially when you get the blank spreadsheet.

During sequencing

Install SAP GUI to the Q: – drive

Create new folder:  Q:\<suite name>\SAP\Common
Move (not copy) the following files from C:\Windows\system32 to Q:\<suite name>\SAP\Common: librfc32.dll, SAPbtmp.dll, icuin34.dll, and libsapu16vc90.dll
From Control Panel, add Q:\<suite name>\SAP\Common to the PATH environment variable.

The above action resolves any error messages relating to launching SAPLOGON.exe

Run the following commands;

REG DELETE HKCR\CLSID\{00020820-0000-0000-C000-000000000046}\InprocHandler32 /f
REG DELETE HKCR\CLSID\{00020820-0000-0000-C000-000000000046}\InprocServer32 /f

This actually resolves the issues when using Excel-in-place feature and getting a blank spreadsheet.

Post sequencing

Remove the following keys

HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Installer

The above action resolves the conflict that occurs when installing SAPs packaged VC++ redists  (which are installed silently in the background) ontop of all other VC++ redists and causing errors when using a native Office.
Error message is; “Microsoft Excel has not been installed by the current user. Please run setup to install the application”

Ensure LOCAL_INTERACTION_ALLOWED is set to true

The above ensures interaction with locally installed applications and sequenced prerequisites