[wix-users] WiX Bundle: How to Write to Log from ExePackage?

Bryan Dam bryand at recastsoftware.com
Mon Mar 28 17:25:27 PDT 2022

Thanks Sean!  That makes perfect sense.

For a hot second there I though the .Net Core EXE was using WiX's logging but upon close inspection it's entirely their own.

-----Original Message-----
From: wix-users <wix-users-bounces at lists.wixtoolset.org> On Behalf Of Sean Hall via wix-users
Sent: Monday, March 28, 2022 6:24 PM
To: WiX Toolset Users Mailing List <wix-users at lists.wixtoolset.org>
Cc: Sean Hall <r.sean.hall at gmail.com>
Subject: Re: [wix-users] WiX Bundle: How to Write to Log from ExePackage?

There is a feature request for this at

The way to do it in v3 is to use the ExePackage/@LogPathVariable attribute to provide a Variable name. Then pass that Variable in the InstallCommand attribute, for example " -log [MyExeLogPath]". And make your .exe parse that command line argument and log everything to that file.

On Mon, Mar 28, 2022 at 4:13 PM Bryan Dam via wix-users < wix-users at lists.wixtoolset.org> wrote:

> We have an ASP.NET Core site that we want to install.  It requires the 
> .Net Core Hosting bundle which itself requires that IIS be installed 
> and, as experience has taught us, the app pool restarted after the .Net Core
> install.   I've solved this by creating a WiX bundle and writing custom
> EXEs to install IIS and restart the app pool in the right sequence.  
> It works, so that's good.
> What I'd like to be able to do though write from my custom EXEs into 
> the log files that get automatically generated by the bundle 
> execution. Our site's MSI installer and the .Net Core installer 
> generate logs but my own EXEs do not.  I have tested them 
> interactively and they output to the console (Console.Writeline()) but that doesn't seem to be the trick.
> Any suggestion for how to output from my custom EXEs so that it gets 
> picked up by the install logs?
>        Thanks,
>            Bryan
> ____________________________________________________________________
> WiX Toolset Users Mailing List provided by FireGiant
> https://nam11.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.f
> iregiant.com%2F&data=04%7C01%7Cbryand%40recastsoftware.com%7Cb2507
> b3a95c448bb591b08da1109b56d%7C9315bb44634846c6bd378880b87e774e%7C0%7C0
> %7C637841030651154064%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQ
> IjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=vwQD6qO1oI
> 80OUYp8oYNQdOCKTBcjHGC7hscH16oRaw%3D&reserved=0

WiX Toolset Users Mailing List provided by FireGiant https://nam11.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.firegiant.com%2F&data=04%7C01%7Cbryand%40recastsoftware.com%7Cb2507b3a95c448bb591b08da1109b56d%7C9315bb44634846c6bd378880b87e774e%7C0%7C0%7C637841030651154064%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000&sdata=vwQD6qO1oI80OUYp8oYNQdOCKTBcjHGC7hscH16oRaw%3D&reserved=0

More information about the wix-users mailing list