When vs2005 generates the installation program, you want to add some actions, such as a window popped up after the installation is complete, or run the program after the installation is complete, you need to use customaction. For more information, see
Automatically start the program http://blog.hjenglish.com/optop/articles/1208387.html after vs2005 installation is complete
How can I customize an MSI in the Visual Studio Setup/deployment project? Http://blogs.msdn.com/astebner/archive/2006/08/12/696833.aspx
Finally, an MSI file is generated. Using this MSI file under XP is normal, but in win7, error 2869 is reported, <The installer has encountered an unexpected error installing this package. this may indicate a problem with this package. the error code is 2869>
After finding information on the Internet, I found that it was caused by UAC of win7/Vista. The specific reason is not explored. The following is the solution,
Post-build script to fix MSI issues in Vista for VS 2005 setup and deployment projects
Http://blog.csdn.net/sfz_roger/archive/2009/09/02/4508540.aspx
Solution for MSI error 2869 on Windows Vista
Http://blogs.x2line.com/al/archive/2007/07/20/3210.aspx
Windows Installer error, error code: 2869. msidbcustomactiontypenoimpersonate
Http://social.msdn.microsoft.com/Forums/en-US/windowsgeneraldevelopmentissues/thread/c1326233-3f10-4d98-96a7-4a22e5eeaa2d/
It is said that the attribute msidbcustomactiontypenoimpersonate needs to be added to customactions. However, I did not find a direct addition method,
Later, I used the third solution.
It should be noted that the Code to be saved should be saved to the directory generated by MSI, and then put cscript noimpersonate. vbs <MSI-File> into the postbuildevent event of the installation project.
BTW: The following article describes the content related to UAC, and I think it is not bad.
Allow your applications to better adapt to Windows Vista User Account Control
Http://msdn.microsoft.com/zh-cn/magazine/cc163486.aspx