You can set the install dir to the absolute path as in the InstallDir_AbsolutePath sample:
BTW your
But most likely you want to change the install dir depending on the runtime conditions. This means that you need to update MSI
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.
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); }
getDirStructure()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.