- I just tested the
GetProductCodeand in my environment it works for both CPU types just fine:
class Program { staticpublicvoid Main(string[] args) { var installed = AppSearch.IsProductInstalled("{1D6432B4-E24D-405E-A4AB-D7E6D088CBC9}"); Console.WriteLine(installed); } }
GetProductCode uses native MsiGetProductInfo (from msi.dll) thus troubleshooting CPU type (or environment) implications of msi.dll interop is outside of Wix# scope. It is a generic .NET problem. You have the code (my prev post) so you can create your own interop that works in your conditions. You can even query registry directly if you need to.project.GUIDis not a product code. ButProject.ProductIdis. You can assign it explicitly. If you don't then Wix# will auto allocate it for you. It will be derived from project.GUID. After the build Wix# always prints out the all allocated ids:
ProductName: MyProduct
Version : 1.0.0.0
ProductId : {6f330b47-2577-43ad-9095-1861ca25889c}
UpgradeCode: {6f330b47-2577-43ad-9095-1861ba25889b}
You can also retrieve the auto-generated ProductId after the build:project.BuildMsi(); Console.WriteLine(project.ProductId);