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
Solution for MSI error 2869 on Windows Vista
Windows Installer error, error code: 2869. msidbcustomactiontypenoimpersonate
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