<InstallExecuteSequence> in Wix#

Oct 16, 2014 at 2:03 PM
Hi Oleg,
 Nice job with the Wix# library. 
I've encountered a difficulty maybe you can help me out. I have to create a specific wix file that has the following instructions :

  <RemoveExistingProducts After="InstallInitialize" />
  <RegisterProduct Suppress="yes"/>
  <RegisterUser Suppress="yes"/>
  <PublishProduct Suppress="yes"/>
  <PublishFeatures Suppress="yes" />
I didn't find a way to implement this instrucitons unsing the Wix# library. Can it be done ? Am I missing something ?
Dec 18, 2014 at 11:26 PM
Hi Robert, I apologist for such a long delay with the response. Accidentally my CodePlex notifications were switched off and until now I was not aware about your post.

If you haven't solve your problem yet this is how you can do it:
        Compiler.WixSourceGenerated += InjectImages;

    static void InjectImages(System.Xml.Linq.XDocument document)
        var productElement = document.Root.Select("Product/InstallExecuteSequence");

        productElement.Add(new XElement("RemoveExistingProducts", new XAttribute("After", "InstallInitialize")));
        productElement.Add(new XElement("RegisterProduct", new XAttribute("Suppress", "yes")));
        productElement.Add(new XElement("RegisterUser", new XAttribute("Suppress", "yes")));
        productElement.Add(new XElement("PublishProduct", new XAttribute("Suppress", "yes")));
        productElement.Add(new XElement("PublishFeatures", new XAttribute("Suppress", "yes")));
Merry Christmas,