avoid pop-up Program Compatibility Assistant (PCA) dialog

来源:互联网 发布:matlab 矩阵怎么转置 编辑:程序博客网 时间:2024/06/08 06:48
<!-- [if gte mso 9]><![endif]-->

  On Window 7 operating system, the Program Compatibility Assistant (PCA) dialog may pop up at the end of installation. This warning dialog will be displayed if the installation unsuccessfully to finish, is canceled by the user, or does not create an entry in Add/Remove Programs Control Panel.

Windows implements PCA program to detect the installation whether successful finish.

There are two ways to avoid this dialog.

1.     Add following section to the manifest of setup.exe. If you use Installshield to make packages, you can add codes below in files named  setupexe.*.manifest under the folder  "C:/Program Files/InstallShield/2010/Support".

<compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1"> 

            <application> 

                        <supportedOS Id="{35138b9a-5d96-4fbd-8e2d-a2440225f93a}"/> 

                        <supportedOS Id="{e2011457-1546-43c5-a5fe-008deee3d3f0}"/> 

            </application>

</compatibility>

Write a key to [HKEY_CURRENT_USER/Software/Microsoft/Windows NT/CurrentVersion/AppCompatFlags/Compatibility Assistant/Persisted]. This way can work on most setup programs. But forInstallshield-based project, it can’t avoid PCA dialog popping up when uninstalled form Add/Remove Programs Control Panel. So the best way is to add a manifest.

 Note that I find Installshield(2008) packages don't show this warning dialog,but other programs like Winrar will also show this dialog.

原创粉丝点击