Deploying a Shim

I guess this topic is pretty redundant, well kind of. I’m sure some applications will require shims for future Windows OS releases. But anyways! I created a post back in May, when I was focused yet again on another Packaging effort being driven by a migration to Windows 7. Now, in that post I walked through how to create shims (you view that HERE ) but never really went into how to deploy the shim so it can be used with your application. For this post, I’m going to assume the application is not virtual. Shims do work with all the good Application Virtualization solutions and the shims can be deployed for these quite easily (some through scripting within the tool or just using your favorite deployment tool) but let’s focus on MSI\MST or Scripted installs.

Scripted Installs

First, let’s touch on the scripted solution. Well this is prety easy this can just be a simple bat file as the install and uninstall of a shim can be executed via the commandline such as:

sdbinst.exe -q <Path>\ApplicationNameFix.sdb

Unfortunately, each shim which is installed creates it’s own entry under Add\Remove Programs and as it’s not an MSI, you can’t just open and tweak these ARP settings yourself. As you may imagine, if you have many shim for applications, your Add Remove Programs will get cluttered. You can resolve this by setting a DWORD registry for the sdb install under the Uninstall registry hive. You could do this using whatever scripting means you which, for example with vbscript:

On Error Resume Next
Set oshell=CreateObject(“WScript.Shell”)
oshell.RegWrite “HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{c73a11d3-6e4f-4436-9f09-1392d41161ce}.sdb\SystemComponent”,1,”REG_DWORD”

The GUID used for this registry can be found by installing the Shim on a machine and doing a search under the Uninstall hive.

The Uninstall can be executed:

sdbinst.exe -u <Path>\ApplicationNameFix.sdb


Open your package with your favorite Editing tool. For my example, I’m using Flexera Installshield because that’s how I roll.

Add your .sdb file to either a new component or an existing component. I suggest having the component Destination set to INSTALLDIR, as you can this variable with the custom actions we’re about to create.


You’ll want to create a ‘NEW EXE using the Path referencing a directory’ Custom Action. This is my own preference, if you’d like, you could add the sdb to the package into the Binary table. I prefer to Install the sdb with the application and then execute the install towards the end of the install. I do this because I like to be able to run a WMI query on all .sdb files. In honesty, I haven’t done that in a few years. The number of .sdb’s in environments I’ve worked in are pretty minimal.


The Working Directory will be set to the location of the sdbinst.exe which is part of the OS. You can see we are using a command very similar to the one shown under the scripting section, only we are using the INSTALLDIR variable as suggested previously. Set In-Script Execution to ‘Deferred Execution in System Context’ to ensure this action is completed in System Context (Administrator privleges) Finally under Install Exec Sequence, you should pick something far down the drop down list e.g.  After Publish Product, Expand the Install Exec Sequence and enter the text Not Installed this ensure this action will only run on install.


You will also need to create an Uninstall custom action, for this custom action you’ll use the -u switch. Also you’ll want to change the Install Exec Sequence condition to REMOVE~=”ALL” This ensure this action, yip, you guessed it, will only run on uninstall of the package.

Finally of course you will want to set your registry key to hide the ARP setting. You can do this simply through the registry table or if you want you could just execute it as a vbscript custom action, your call. And that should be it!







App-V Sequencing Visio 2010 and Visio 2013 with App-V 5.0

I had big plans to put together a recipe for sequencing Visio 2010 just because I felt as though you need to read between the lines of the Microsoft Guide for Sequencing Office 2010 with App-V 5.0 to figure it out. Which you can find HERE .On reflection, I think it would be unfair of me to do a complete beginning to end recipe because somebody did go to the trouble of creating the guide and having gone through it a couple of times before attempting, it does make sense. At first I was a little confused around Step 12 as it made special mention of Visio. I also got a little frustrated due to needing to read the headings to make sure the step was applicable to what I was trying to do. I was concerned I may be missing a step or making a mistake but it is as simple as following from top to bottom and including that subsection after Step 12.

I have sequenced Office 2010 quite a few times with App-V 4.6, I can’t say that I ever particularly enjoyed doing it or enjoyed the end product. The requirement to plan and deploy that dang OffVirt.msi as a local traditional install left a bad taste in my mouth. If you’re asking, why am I raving about Office 2010 and the OffVirt.msi? well, that needed to be deployed for all Office 2010 products including Visio and Project and it was a bit of a pain in the ass :) Well, good news, Microsoft have taken advantage of some of the new features of App-V 5.0 to improve the delivery of Office 2010 Products. Now you do not need to deploy the OffVirt.msi before you deploy the virtual Visio or Project or whatever…you can include the OffVirt.msi in the package and simply download and add the Integrater.exe (Which is part of the Sequencer Kit found in the link in the first paragraph) to the Scripts folder, which can be found in Package Files within the App-V Sequencer. By doing this, it appears that the Integrator.exe is run when Adding the App-V Package to the client, it see’s the OffVirt.msi and runs it to ensure the licensing for Office is set on the local machine enabling the App-V package to work. Some other features are enabled to work for Office using the Offvirt.msi, check out parameters used in the Guide linked in the first paragraph for more.

So, if I’m not going to provide a recipe, why am I bothering with a blog post? That’s for two reason, two points I feel you need to be aware of before sequencing Visio 2010 and those are as follows:

1.) Many times the appeal for us techie folks of App-V is the ability to run multiple versions of the same application side by side thanks to our old friend Isolation. Unfortunately as the licensing gets passed to the local machine in order to function, we cannot have multiple versions of the more recent Office Products. Be they Office 2010 Products or Office 2013. What do I mean? I mean if you want to have Visio 2010 Standard edition and Visio 2010 Professional edition on one client machine, you cannot. The greater of the versions will apply e.g. All users will get Professional rather than Standard. The same logic applies to Visio 2013. It’s a bit of a pain in the ass. If you are using these products with something like Citrix Terminal Services you could simply Silo the different versions onto separate servers to get around that problem. Otherwise, you may be a little our of luck.

2.) Beware of the Windows\Installer folder. In the past, a common practice which is highlighted in an older blog post by Aaron Parker HERE was to delete the Windows Installer folder as this is a cache for the Installation of applications which use MSI, MSP or MST files. These could be leveraged for application repair or possibly upgrade in the MSI world but this doesn’t apply to App-V, so we removed them. The Good News is that we can still delete any MSI, MSP or MST files which cause unwanted bloat but you need to be very careful about what else is in there.

I had tweeted about my progress with Sequencing Visio and got a reply from Dan Gough, a seasoned App-V expert, I encourage everyone to check out his blog http://packageology.com/


I had just figured out what he was going to tell me. I was receiving an error:


Pretty useless error, it actually made me double take…I was wondering if there was a legit network issue! I tried to clear the app and try again on a couple of different machines before I decided to second guess the error and check the Event logs…note to self: Start with the Event Logs :)


When I checked the event log, I saw the above. Virtual Fonts subsystem failure!?! WTF?, I decided to check out the AppXManifest.xml file, for anybody who is new to App-V 5.0, you can do this by making a copy of your applications .appv file and renaming it to .zip, then simply open it.


By doing a quick CTRL+F and typing in Fonts, I found that fonts that were captured during sequencing and as you’ll notice they were found to be residing in the Installer cache location. Which I deleted. So, what was the fix? I just did a quick re-sequence and only removed the MSI, MSP and MST files, leaving the rest of the Installer cache. If you look in the same XML file you’ll also see other files including some .ico files that are also referenced in this folder. So it’s best to leave the folder in the package. In fact both Nicke and Dan, who can be found in my Blogroll have suggested to me that it’s a good idea to only delete the installers themselves in most cases as when you delete the .ico files it can mess up how the icons appear when carrying out certain actions such as Open File. I did notice that for the font issue, I could also resolve this by setting VirtualFonts to disabled in the User Configuration XML file and publishing the application using this. As I had Office locally installed, the fonts appeared to already be included on the local system so it worked but unfortunately, the icons were specific to Visio and so those files were required to be in my package.

I hope this helps somebody out there!



Webinar: Getting to Know App-V 5.0 SP2

Hi Guys,

With the overwhelming popularity of the App-V webinar I just completed, I figured it would be a good idea to give out links to what I talked about:

Permissions in App-V: http://packageology.com/2013/06/file-permissions-app-v-5/

Decision Matrix: http://rorymon.com/blog/index.php/app-v-decision-matrix-v-4-0/

Regards the Question about Setting Override\Merge on VREG and any other sequencing questions: App-V Sequencing Guide

Any possible SCCM Integration Questions: HERE

Unfortunately Powerpoint crashed right as I looked at the Diagrams for the Full Infrastructure. I wanted to point out, in my diagram for 5.0 that the App-V Streaming Server was show, this is NOT an option in App-V, However! It is an option in App-V 4.x and as Co-Existence is supported between 4.6 SP2\SP3 and 5.0, Microsoft does list it as a supported configuration. More on this HERE

How to setup for Shared Content Store: http://technet.microsoft.com/en-us/library/jj713455.aspx

All you need to know about the App-V Client: http://www.microsoft.com/en-us/download/details.aspx?id=41635 …

As I answer questions, I may post them over here or on the Dappug.com….sorry to Dan Gough, I butchered his Web Address!!