One of the more obscure functionalities in App-V is the concept of differential SFT files. These DSFT files were introduced into product during 4.5 Release Candidate -phase, at which point you actually had UI option in the Sequencer for generating such an output:

In a very surprising move, this option was actually removed from the Sequencer when RTM was released. I guess it was confusing enough that they felt better to hide the whole thing rather than trying to explain it.. But fear not, DSFTs are still with us (yes, even in 4.6 beta), it’s just that you don’t really see it anywhere. The purpose of this post is to explain them and also show how you can use DSFTs and why.
So what is DSFT anyways?
Differential SFT files are, like the name implies, SFT files that contain the differential data (delta) between two versions of the SFT files; the older one and the upgraded one. This is a bit like what you would expect from the MSP files in context of Windows Installer, but of course it is not fully analogous.
DSFT files contain the identical headers to the upgraded SFT file, but only those blocks (FB 1 and 2) that is new to that particular version. This basically enables you to deliver upgraded App-V packages just as that, as upgrade, instead of traditional way of delivering new full SFT file which may contain loads of [old] data the client already has. With streaming, this is of course no problem because of differential streaming, but when servicing standalone client it would be handy to deliver only those bits that matter.
I should stress that the differential SFT file is just the differential between two consecutive versions i.e. if you have package in the client cache that is from the older SFT version (not previous to the most current one) you are not able to bring it up-to-date with the latest DSFT file; you would actually need to have one DSFT file applied per each upgrade version!
How do I create one?
As previously said, there used to be option in the Sequencer for a very brief while for creating a DSFT file. You can notice still in 4.5 builds the strange missing line in the checkboxes for Deployment -tab, that’s the placeholder where the DSFT checkbox used to be.
Now without GUI based option, out only choice – at least for time being – is to use executable that actually ships with Sequencer but probably not many knows about: mkdiffpkg.exe.
This tool is a very simple command-line based DSFT generator, which basically needs one input file and one output file; SFT file and DSFT file, respectively. The whole idea is that you choose your upgraded SFT file as source and the tool scans what blocks match the SFTs version (remember, as of 4.5, App-V Sequencer assigns file versions to match the SFTs version, instead of incrementing by one by each change as it used to be). These blocks are then written out as DSFT file, specified as second argument for mkdiffpkg.exe, ready to be delivered.
One of the reasons the checkbox in Sequencer UI was confusing is exactly this; DSFT generating is clearly an post-Sequencing task which did not sit in the flow how Sequencer is used. If you enable the check-box, does that mean you want changes for this version or the one you trigger by saving? You cannot also create DSFT against your very first version of SFT, that would not make sense. And hence the checkbox was always grayed out when doing Sequencing (adding to the confusion still), only when you opened package for upgrade you could enable it.
DSFT creation example
So, let’s create an example difference file for one of the applications available at my InstantApp -site. For simplicity’s sake I’ll choose VirtualDub which is an AVI video editor and provided in ZIP file instead of full-blown installer. The version I’ll base my upgrade on (and which is available at the site in time of writing this) is 1.6.14, clearly not the latest anymore as one available from VirtualDub’s SourceForge site is 1.9.5.
As a first thing to do, I’ll perform an usual upgrade to App-V package. Note that my package was originally created in 4.0 (!) Sequencer, so the upgraded one is by necessity now brought to 4.5 level (I’ll use 4.5 RTM for this):

Ok, so for this upgrade I simplycopy few files over from the extracted ZIP file to my package’s directory structure on Q: -drive:

Then we start the main application (VirtualDub.exe) like you always should (2-3 times) and this time for good measure; it asked about license agreement and also presented first-run dialog. Moving on and after stopping the monitoring, I’ll remove unnecessary MSI runtime files and also modify shortcut to reflect the changed version number.
After not optimizing for FB1/2 (it’s too small package to make any difference with such a thing) I’ll examine the results before saving and see that some of the files are not at version 2 but still at version 1. These are the ones that do not get included inside DSFT file I’m going to generate in a short while:

Next I’ll just simply hit save in order to create v2 version of my VirtualDub App-V package and sure enough, I soon have my package files for version 2:

Comparing this new version of SFT file, I see that it’s size has increased by over 2 megabytes over v1 of the SFT file. Now only thing left is the interesting part, the DSFT generation:

Yes, it’s that easy ;-)
Looking at the DSFT file generated, it’s 3388 kB in size, so we really couldn’t save much space (3419 kB – 3388 kB = 31 kB!) in this particular upgrade scenario, but for packages where less files changes the saving could be significant. Just think of Office hotfix for instance..
How/where can I use this DSFT file?
That’s a very good question. As it is, there’s no UI options or indication in the MSI wrapper or SCCM integration or, well, anything anywhere that would suggest an ability to use DSFT files. But that does not mean there actually isn’t way to utilize those delta files!
Yes, I’m talking about good old sfttray.exe here. This is the executable that MSI wrapper also uses in the background for loading (importing) SFT file when you deliver virtual applications via MSI file to the client. And it is that very same syntax you can use for reading in DSFTs, just simply by pointing to DSFT file instad of SFT:
sfttray /load “MyApp 1.1″ /SFTFILE c:\tmp\MyApp_2.dsft
This will trigger loading of package into the client’s cache, but instead of loading the whole package we actually load just the bits available inside DSFT, resulting an update to the package without overhead of moving whole SFT around.
As can be seen, this would be very easy to incorporate into one’s own scripts. Or, maybe even to use when delivering those wrapped MSI packages, but instead of pointing to SFT just point to DSFT!
DSFT usage example
Continuing our earlier example of VirtualDub, let’s now apply the difference to the client. For this purpose, I’ll have 4.5 client installed which has already received the v1 of the VirtualDub package from Management Server. My task is to apply v2 version to the client using DSFT version instead of publishing our upgraded v2 SFT through Management Server:

When launching VirtualDub at the client, I can verify from the GUI that it’s indeed original – unupgraded – one:

So let’s do an upgrade via DSFT file we generated after sequencing.
Remember to close all applications from the package, otherwise you cannot upgrade package data in the cache (DSFT or otherwise)! You also need to have permissions set to allow importing or be local admin in order to import via sfttray and you HAVE to specify full path to the DSFT file:

Now, only thing left to do is to check if our upgrade with DSFT actually succeeded to achieve what we wanted. As we could see the version directly from the VirtualDub GUI, simply re-start it from the existing shortcut and see what happens..

Success! :-) We managed to upgrade our package with DSFT file!
Although there is one caveat you should be aware of (and I bumped into this during my testing): if your original package has been delivered to desktop via Management/Streaming Server (as mine had), client will try to do downgrade of the package from DSFT upgraded one when you launch it, unless you have matching updated SFT file published in the centralized server as well. The reasonfor this is very simple: client will have a check with the server (if it can be reached) each time you launch an virtual application and if the server contains older SFT than one you delivered with DSFT, client will think it needs to revert back to older version (”Active Downgrade”, if you will)!
In any case, DSFT is something you definitely can take advantage of by following the advise I have outline in this article. Just be careful with it when combined with the streaming delivery.
–
You can download my upgraded package and DSFT file used in the examples from here and here.
Happy DSFT’ing!