Send finished Logs to third party AfterInstall

May 12, 2016 at 4:16 PM
Hi Oleg,
I am trying to send the logs files after the installation finishes.

I know there is .AfterInstall SetupEventHandler that I can use when installation finishes. But Logs ares still being written until the setup finishes.

Is there a way in WixSharp besides launching a process (within AfterInstall) that could send those logs ?

(I'm not missing much though, properties of the last MSI installation)

Thanks
May 13, 2016 at 2:14 AM
I don't see any other way. Launching the send_report.exe process from some custom action seems to be the way to go. Though you will need to wait from this process for the completion of your setup. And this monitoring may be a bit of a challenge.

Surely you can pass the Process.Current.Id to your send_report.exe from your custom action but the problem is that MSI always executes custom actions individually from rundll32.exe and when rundll32 exits it only signifies the completion of that specific CA but not the whole setup. Thus you may need to find and pass the proc id of the parent process msiexec.exe.

Keep in mind that if you go with the external send_report.exe you can pack it to your msi as binary content but you don't have to install it. You can just read it from the msi binary stream, copy to some temp location and execute it from there.

Or even better option to include it as a .NET resource into your build script (assembly). But of course it is only possible for ManagedSetup or managed CustiomAction.

Cheers,
Oleg