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.
Instructions:
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):
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!
