0

I want to create a MSI that installs a certificate in the local machine store on several computers. As the certificate will be different on each machine I wanted to exclude the pfx from the MSI so that I can provide the same MSI everywhere and only have to pick the correct certificate.

How can I tell WiX that the Binary element that encapsulates the pfx included in the Setup should be a file in the Installation source Directory and not embedded in the MSI?

1 Answers1

1

You'll need to stream the files out yourself. If you search the web there are things like this that show the principles involved:

http://windows-installer-xml-wix-toolset.687559.n2.nabble.com/Extract-Binary-file-from-MSI-to-Temp-folder-using-C-td7588682.html

http://makemsi-manual.dennisbareis.com/extract_binary_at_install_time.htm

The trick is the SQL query stuff. In WiX you just use the Binary element to get the files in there.

If you are putting pfx files in your Binary table, you are aware that MSI files are transparent and I could, for example, open your MSI file with Orca and extract your pfx file and maybe sign things with it?

PhilDW
  • 20,260
  • 1
  • 18
  • 28
  • Actually I don't want to put the pfx file as a binary into the msi. I want to distribute 2 files: an "installcert.msi" accompanied by an "installcert.pfx". The msi would always be the same. The pfx would changed regarding to the current machine. In the msi I want to refer to the pfx file in the element. – Daniel Schlößer Apr 04 '14 at 07:52