问题
Is it possible to include C++ code inside a Wix Project. For example either
1. Have C++ inside a file with extension ".wxs" (Wix source file)
2. Or Create ".cpp" file inside the Wix project and run it from Wix. ( I tried this, but Visual Studio doesn't allow me to create .cpp file in the project ... but only wxs & wsi files )
回答1:
No, you cannot directly include C++ Code/File in WIX project.
You can write your own C++ Custom Action and then call it from your wix project.
NOTE
You should not use a custom action to do things that the installer itself can do.
For Your Reading
http://bonemanblog.blogspot.in/2005/10/custom-action-tutorial-part-i-custom.html
http://blogs.technet.com/b/alexshev/archive/2009/05/15/from-msi-to-wix-part-22-dll-custom-actions-introduction.aspx
来源:https://stackoverflow.com/questions/20671950/is-it-possible-to-integrate-c-code-inside-wix-project