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

New Post: Change Target Install Directory

$
0
0
You can set the install dir to the absolute path as in the InstallDir_AbsolutePath sample:
staticpublicvoid Main()
{
    var project = new Project("MyProduct",
                        new Dir(@"D:\MyCompany\MyProduct",
                            new Files(@"files\*.*")));

    project.UI = WUI.WixUI_ProgressOnly;

    Compiler.PreserveTempFiles = true;
    Compiler.BuildMsi(project);
}
BTW yourgetDirStructure()probably does what '*.*' does so you may want to have a look at "WildCard Files" and particularly "Release Folder" samples.

But most likely you want to change the install dir depending on the runtime conditions. This means that you need to update MSI INSTALLDIR property to your desired location just before MSI runtime starts installing the files. This is what usually MSI GUI does. You can modify your ManagedUI (C#) InstallDir dialog to do the runtime INSTALLDIR assignment.

Though a more reliable approach would be to do it in one of the ManagedSetup events. Have a look at "Setup Events" sample. It does exactly that.

Viewing all articles
Browse latest Browse all 1354

Trending Articles



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