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

New Post: Web setup feature

$
0
0
After some more consideration I think I overlooked something very obvious.

Create a custom very simple downloader app:
//my_web_setup.exestaticvoid Main(string[] args)
{
    if(args.First() == "/i")
    {
        string url = "http://mycompany.com/my_x86.msi";          
        string file = Web.Download(url);
        Process.Start("msiexec.exe", "/i \""+ file+"\"").WaitForExit();
    }
    else
    {
         Process.Start("msiexec.exe", "/u <your product GUID>").WaitForExit();
    }
}
And now in define your bootstrapper:
var bootstrapper =
        new Bundle("My Product",
            new PackageGroupRef("NetFx40Web"),
            new ExePackage("my_web_setup.exe")
            {
                Id = "package1",
                Name = "MySetup",
                InstallCommand = "/i",
                UninstallCommand = "/u"
                DetectCondition = "MY_PRODUCT_DETECTED",
                Permanent = true,
            };
And of course you will need to set up reading your product key from registry into MY_PRODUCT_DETECTED. For that you will need to use UtilRegistrySearch class (see WixBootstrapper sample).

Viewing all articles
Browse latest Browse all 1354

Trending Articles



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