Quantcast
Channel: wixsharp Discussions Rss Feed
Viewing all articles
Browse latest Browse all 1354

New Post: Admin Installs

$
0
0
It is done in the today release (v1.0.6.0).

I have added an AdminInstall sample that demonstrates how to use the technique. Please note that the sample is intended to demonstrate how to ensure a proper setting up of the AdminExecuteSequence but not to to prepare a complete AdminInstall MSI.

BTW, the desired behavior could also be achieved with previous releases. You can intercept and modify Wxs just before it is fed to the WiX compilers:
Compiler.WixSourceGenerated += Compiler_WixSourceGenerated;
...
staticvoid Compiler_WixSourceGenerated(System.Xml.Linq.XDocument document)
{
    XElement installExec = document.Descendants("InstallExecuteSequence").First();
    XElement adminAction = installExec.Elements()
                                      .Where(e => e.HasAttribute("Action") &&
                                       e.Attribute("Action").Value.EndsWith("MyAdminAction"))
                                      .First();

    adminAction.Remove();

    installExec.Parent.SelectOrCreate("AdminExecuteSequence").Add(adminAction); 
}

Viewing all articles
Browse latest Browse all 1354

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>