Home > Blogs > VMware ThinApp Blog

Launching a ThinApp Packaged App in Windows Compatibility Mode

Recently we were asked again about being able to launch a ThinApp packaged application in Windows Compatibility Mode. While VMware Community Member EuwRhU posted a script on how to do this here (Thanks EuwRhU!), I wanted to capture this knowledge in one location here on the ThinApp Blogs as we’ve been asked a number of times since EuwRhU’s posting on how to do this.


Note: Copied from EuwRhU’s post

On Windows XP, the Compatibility Mode settings are stored in the HKCU\Software\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers registry key.

UPDATE: The below script has been updated to work with newer versions of ThinApp when not using ProcessExternalNameBehavior=Original.

If you want your ThinApp packaged application to run with those settings, you need to write them to the physical Registry. You can use the following script to do this (make sure to remove the compatibility settings that you don’t want from the bolded/italiziced line below):

AdminScriptEditor Script Conversion

Option Explicit
Function OnFirstSandboxOwner
Dim compatSettings, registryKey, procID
compatSettings = Chr(34) & "WIN98 256COLOR 640X480 DISABLETHEMES DISABLECICERO" & Chr(34)
registryKey = Chr(34) & "HKCU\Software\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers" & Chr(34)
procID = ExecuteExternalProcess("reg.exe add " & registryKey _
& " /v " & Chr(34) & GetCurrentProcessName & Chr(34) _
& " /t REG_SZ" _
& " /d " & compatSettings _
& " /f")
WaitForProcess procID, 0
End Function

For additional information on Windows Compatibility, you may wish to see the Microsoft KB “How to use the Compatibility Administrator utility in Windows” as it discusses these settings and has links to other documentation which may be useful.

On behalf of the entire ThinApp Community, Thanks EuwRhU for posting this!

This entry was posted in 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.