次の方法で共有


How to work around the Program Compatibility Assistant warning in Visual Studio unattended setup

If you are creating and using an unattended INI file to deploy VS 2005/VS 2008/VS 2010, and the target system is Windows VISTA and above Operating Systems then the Program Compatibility Assistant may display a warning. Additionally, it may stop the installation.

The Program Compatibility Assistant provides a dialog warning if compatibility issues are detected during an installation or execution of a program. To allow for the automated installation of a program, you would need to disable the Program Compatibility Assistant warning. In order to do that first use a test computer to determine the registry keys to create.  You can then use those registry keys to disable the Program Compatibility Assistant warning on other computers. To do this, follow these steps indicated below:

1.Run the affected program on a test computer.

2.When you receive the Program Compatibility Assistant warning message, click to select the Don't show this message again check box.
This above action creates a registry entry in the following registry subkey:
HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags
The name of the entry is the GUID that represents the program entry in the Appcompat database. The entry type is DWORD, and the entry has a value of 0x77.

3.Exit the program.

4.Save the registry entry that was created in step 2.

5.In the installation script, include steps to add the registry entry before the installation starts.

N.B.  In order to disable The Program Compatibility Assistant permanantly, disable Program Compatibility Assistant Service. Execute the command "services.msc" from the Start menu and locate the Program Compatibility Assistant Service. Double-click on the service to open it’s Properties dialog. You can Stop the service by clicking the appropriate button and if you wish to prevent the service from restart on the next reboot, change it’s Startup type to Disabled.

 

Untitled

Comments

  • Anonymous
    July 14, 2014
    I have a ClickOnce setup.exe that is bringing up PCA warning on some machines (but not all). I have checked with users that have clicked "This program installed correctly", but none of them had the GUID entries in the AppCompatFlags key.