How to automatically suppress application compatibility warnings on Windows Vista

Recently, a fellow employee contacted me with a question about unattended installation of Visual Studio 2005 on Windows Vista.  They were following the instructions that I posted in this blog post to prevent unattended installation from trying to install the .NET Framework 2.0 and the instructions in this blog post to control reboots.

However, when they ran the unattended install on the final version of Windows Vista, they saw a few pop-up application compatibility warning dialogs during installation that looked like the one I described in this blog post.  They asked me how to suppress these dialogs, and since I didn't know for sure how to do this automatically, I talked to some people who work on the Windows application compatibility team.

I was able to use the following steps to automatically suppress the application compatibility warnings that normally appear during Visual Studio 2005 setup on Windows Vista:

  1. Click on the Start menu, choose All Programs, then Accessories
  2. Right-click on the Command Prompt and choose Run as administrator to open an elevated cmd prompt
  3. Run reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags" /v {2a0da30d-846f-4680-89da-2dbc457d7b44} /t REG_DWORD /d 4 /f
  4. Run reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags" /v {319b29ae-7427-4fbc-9355-22df056c27a4} /t REG_DWORD /d 4 /f
  5. Run reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags" /v {3d06c673-5e8a-41c0-b47f-3c3ca0a22e67} /t REG_DWORD /d 4 /f
  6. Run reg add "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags" /v {5f66dbae-cad3-468a-83d0-77ace8abc1f6} /t REG_DWORD /d 4 /f

The GUIDs listed in steps 3, 4 and 5 are associated with SQL Server 2005 Express Edition (which is installed during Visual Studio 2005 setup) and the GUID listed in step 6 is associated with the Visual Studio 2005 IDE (devenv.exe) which is launched during Visual Studio 2005 setup to configure some settings.

I was able to figure out the exact list of GUIDs by using a really interesting tool - the Application Compatibility Toolkit 5.0.  You can download this toolkit at this location if you are interested in trying it out -

The Application Compatibility Toolkit 5.0 includes a tool that lets you view, enable and disable all of the application compatibility fixes that are included as a part of Windows Vista.  These are the steps I used to determine what GUID values needed to be set in the registry to disable the application compatibility warnings for Visual Studio 2005:

  1. Download and install the Application Compatibility Toolkit 5.0 from
  2. Click on the Start menu, choose All Programs, then Microsoft Application Compatibility Toolkit 5.0
  3. Right click on the item named Compatibility Administrator and choose Run as administrator to launch it with elevated privileges
  4. Expand the Applications node under System Database and click on the application you are interested in to display a list of related binaries - in this case, I looked at Microsoft SQL Server 2005 and Visual Studio 2005
  5. In the list of binaries, locate the binary file that has an application compatibility AppHelp message associated with it, right-click on it and choose Disable Entry
  6. Open regedit.exe, browse to HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags and verify that a REG_DWORD value has been added with a GUID for the value name name - this is the registry value that will prevent Windows Vista from displaying the application compatibility message when you run it 

You can also use the Search and Query buttons in the Compatibility Administrator tool if you are not sure of the exact name of the application or binary that is causing the application compatibility message to appear.

<update date="2/27/2007"> The final version of the Microsoft Application Compatibility Toolkit v5.0 has been released. Updating links to point to the final version instead of the old beta version. </update>