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

New Post: How to specify the specific installation directory

$
0
0
The Wix directory (Wix# Dir target path) doesn't allow absolute path. Thus it has to be done by overriding the INSTALLDIR property prior the installation:
 Project project =
            new Project("MyProduct",
                new Dir(@"%ProgramFiles%\My Company\My Product",
                    new File(@"Files\Bin\MyApp.exe"),
                    new Dir(@"Docs\Manual",
                        new File(@"Files\Docs\Manual.txt"))),
                new SetPropertyAction("INSTALLDIR", @"C:\My Company\My Product"));

        project.UI = WUI.WixUI_InstallDir;
        project.GUID = new Guid("6f330b47-2577-43ad-9095-1861ba25889b");
        
        Compiler.PreserveTempFiles = true;
        Compiler.BuildMsi(project);
However I do see the value in fixing this WiX usability flaw and allowing the direct absolute path. In fact it is exactly in the "Wix# spirit":
            ...
            new Project("MyProduct",
                new Dir(@"C:\My Company\My Product",
                    new File(@"Files\Bin\MyApp.exe"),
            ...
Thus I have put it in my pending features list so watch for the future releases.

Viewing all articles
Browse latest Browse all 1354

Trending Articles



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