Home > Blogs > VMware ThinApp Blog

Using the ThinApp SDK to apply an AppSync Update

Recently I was asked if the ThinApp SDK can be utilized to force an AppSync update on a ThinApp Package. More importantly, some customers have wanted to know if it was possible to change the AppSync URL on the fly.

So….I thought I’d share this script. ๐Ÿ™‚

Very simply, this VBScript uses the ThinApp SDK to attach to the original package and conduct an AppSync Update to it with a specified “newer” package.

This ONLY requires a couple of things…

  1. THINAPPSDK.DLL is registered on the system where the script is executed.
  2. The old ThinApp Package (TAOldPackage) is accessible to the system/user running the script.
  3. The new ThinApp Package URL (TANewPackageURL) is accessible to the system/user running the script.
  4. This code should be executed natively. The application may be left running while the Application Sync update is performed (this goes for both the ThinApp SDK and APPSYNC.EXE), however, the user must close and reopen the application in order to see the update (same as with a ThinApp Side-by-Side update).
  5. Technically, one could put the script into a ThinApp package of it’s own, but this might be a little convoluted…and definitely need testing. The interesting (and somewhat crazy) thought here is the script could do the AppSync with a ThinApp package vs the actual Package AppSync settings (found in the PACKAGE.INI) and the script could be used to also perform search validation for an updated package based upon whatever validation logic defined. But this is all “Crazy Talk” here….so remember, test, test, Test! ๐Ÿ™‚

AdminScriptEditor Script Conversion

' Set Environment Variables
Set TAManagement = CreateObject("ThinApp.Management")
Dim AppSyncPkg
TAOldPackage = "C:\Temp\AppSync\Mozilla Firefox.exe"
TANewPackageURL = "file:///C:/temp/appsync/304.exe"
AppSyncUpdate TAOldPackage, TANewPackageURL
Function AppSyncUpdate (TAOldPackage, TANewPackageURL)
On Error Resume Next
     ' Declare the ThinApp Package/File and open
     Set AppSyncPkg = TAManagement.OpenPackage (TAOldPackage)
     ' Attach to the package and do an AppSync Update
     Sync = AppSyncPkg.AppSync (True, LCase(TANewPackageURL))
End Function

Ohh….and none of the ThinApp packages need AppSync configured prior to this. It just works. ๐Ÿ˜‰

This entry was posted in AppSync, Scripts and tagged , , on by .
Dean Flaming

About Dean Flaming

Dean is currently an EUC Architect and member of the VMware End User Computing Enablement and Lighthouse Support teams, working to develop communications and IP around VMware End User Computing products and solutions as well as support many various Lighthouse accounts with their own EUC practices. Prior to this, from 2008 through 2012 Dean was one of VMware's End User Computing Specialists. Throughout his time at VMware, Dean has also written and published various articles, videos, and podcasts regarding VMware's EUC Solutions.