Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

In WiX, where is the ProductCode specified?

Tags:

wix

I'm using WiX to create an installer, and in order to uninstall my application from the command line (using MsiExec.exe /X{...}) I need to know the ProductCode for my .msi file.

When I install my application, I can see that the ProductCode is listed in the installation log file. However, the GUID shown does not feature anywhere in my WiX files. It also seems to change between builds of my installer.

Can I specify the ProductCode somewhere in my WiX .wsx file? If so, where?

like image 524
Richard Ev Avatar asked Apr 26 '12 09:04

Richard Ev


1 Answers

The product code is the Id of the Product element.

Specifying a guid

<Product Id="INSERT_GUID_HERE" 

Specifying a '*' makes the GUID auto generate every time

<Product Id="*"

Or you can store the product code as a variable in a config.wxi file and reference it like so

<Product Id="$(var.MyProductCode)"
like image 141
BryanJ Avatar answered Oct 14 '22 20:10

BryanJ