[wix-users] MSI as a wrapper for EXEs

Herman van Drie hvandrie at outlook.com
Wed Dec 16 00:04:32 PST 2020


I never understand people that want to use .msi to bootstrap an .exe - which actually does what an .msi is meant to do...
With .msi you have a whole controlled framework including rollback mechanism available, you'd only need to understand some things very well how the workflow works inside Windows Installer and the different sequences it runs.

You Exe's can be streamed into the Binary table. You can use Custom Action type 2 (https://docs.microsoft.com/en-us/windows/win32/msi/summary-list-of-all-custom-action-types) to run them using Custom Action table and InstallExecuteSequence.

Binary Table:
YourExeInBinaryTable.exe

Custom Action table:
RunMyExe	2	YourExeInBinaryTable.exe	/Silent

InstallExecuteSequence table:
RunMyExe	Not Installed	6800

Sequence 6800 assumes it runs after InstallFinalize action. Custom Action is set to run as an Immediate Execution at the given sequence.
That's it.

Cheers,

Herman


-----Original Message-----
From: wix-users <wix-users-bounces at lists.wixtoolset.org> On Behalf Of Valer Nur via wix-users
Sent: woensdag 9 december 2020 10:10
To: Herman van Drie via wix-users <wix-users at lists.wixtoolset.org>
Cc: Valer Nur <valernur at yahoo.com>
Subject: Re: [wix-users] MSI as a wrapper for EXEs

 Thank you. The EXE is not calling any external MSI but simply doing the required installation steps: copy files, registry etc.

    On Wednesday, December 9, 2020, 10:00:00 AM GMT+2, Herman van Drie via wix-users <wix-users at lists.wixtoolset.org> wrote:  
 
 Fairly simple using Binary table and calling Exe's as CA's.
However, what exactly do your Exe's do? If they themselves call to (un)install another Msi this won't work as you can't start another Windows Installer session within a session. You'd then would need to change to Multiple Package Transaction method using a specific embedded chainer.

So, what exactly is it what those Exe's do?

Get Outlook for Android<https://aka.ms/ghei36>

________________________________
From: wix-users <wix-users-bounces at lists.wixtoolset.org> on behalf of Christopher Painter via wix-users <wix-users at lists.wixtoolset.org>
Sent: Tuesday, December 8, 2020 7:06:49 PM
To: wix-users at lists.wixtoolset.org <wix-users at lists.wixtoolset.org>
Cc: Christopher Painter <chrpai at iswix.com>
Subject: Re: [wix-users] MSI as a wrapper for EXEs

It can be done with (severe) limitations.  This is referred to as a Trojan MSI.  You create an MSI with a UI experience and then have WiX Quiet Execute custom actions that call the EXE on install and uninstall.

A shortlist of things to consider is:

1) If a user edits the MSI using ORCA they won't have any of the normal meta data telling them what the MSI does.

2) If the EXE fails, MSI can't roll back the changes.  This applies to both install and uninstall.

3) If the EXE has undesired behavior it generally can't be transformed.

More but those are the biggies.  If the install EXE and uninstall EXE were the same I'd point you to an application called EXE


Often times setup developers will "repackage" the EXE into an MSI.  This is basically the process of capturing the changes made by the exe ("setup intent") and authoring an MSI to do the same natively.



________________________________
From: wix-users <wix-users-bounces at lists.wixtoolset.org> on behalf of Valer Nur via wix-users <wix-users at lists.wixtoolset.org>
Sent: Tuesday, December 8, 2020 4:44 AM
To: wix-users at lists.wixtoolset.org <wix-users at lists.wixtoolset.org>
Cc: Valer Nur <valernur at yahoo.com>
Subject: [wix-users] MSI as a wrapper for EXEs

Hello,
This is my first step with MSI technology.

I have today two windows executable (EXEs): one is doing install and one is doing uninstall. They are both working silently and do not require any input from the user.
I am looking for a way to "wrap" them in a single MSI that will simply invoke these two EXEs without the need to rebuild the installation logic.

Is it possible to do it with Wix or is there another recommended tool for this (hopefully simple) mission?
Any guidance/feedback will be appreciated.

Valer

____________________________________________________________________
WiX Toolset Users Mailing List provided by FireGiant http://www.firegiant.com/

____________________________________________________________________
WiX Toolset Users Mailing List provided by FireGiant http://www.firegiant.com/

____________________________________________________________________
WiX Toolset Users Mailing List provided by FireGiant http://www.firegiant.com/
  

____________________________________________________________________
WiX Toolset Users Mailing List provided by FireGiant http://www.firegiant.com/


More information about the wix-users mailing list