[wix-users] Delay installing (application) pre-requisites

George Legge george at haglis.co.uk
Tue Oct 27 13:51:27 PDT 2015


Hi Phill,

Thanks for the reply, very helpful as I certainly got the wrong impression
from that SO post.

We want to use the WixStdBA for now and will do a full mba in the next phase
when we will customise the UI a lot more.

How can we tell in the bundle which Features have been chosen and to install
IIS for only feature one with the following wee example of 2 FEATURES, Chain
and IIS Installer elements (I took these from an SO post
(http://stackoverflow.com/questions/24439602/wix-burn-install-iis-if-not-yet
-installed/24491306#24491306)  ?

	<Feature Id="Feature1"
            		 Title="IISAPP"
             		Description="Needs IIS and .Net 4.5 to run"
             		Level="1">
      	    <ComponentGroupRef Id="Component1" />
      	    <ComponentGroupRef Id="Component2"/>
    	</Feature>

    	<Feature Id="Feature2"
             		Title="ExecNoIIS"
             		Description="Executable requires only .Net 4.5"
             		Level="1">
	    <ComponentGroupRef Id="Component3"/>
    	</Feature>



	<Chain>
      		<PackageGroupRef Id="InstallIIS"/>
		<MsiPackage SourceFile="MyInstaller.msi"  />
    	</Chain>


 	 <Fragment>    
    		<PackageGroup Id="InstallIIS">
     			 <ExePackage
                  			Id="IIS_part0"
                  			SourceFile="run.bat"
                  			DisplayName="Installing IIS:
IIS-WebServerRole"
                  			InstallCommand="dism.exe /Online
/Enable-Feature /FeatureName:IIS-WebServerRole"  >
      			</ExePackage>
      			<ExePackage
                  			Id="IIS_part1"
                  			SourceFile="run.bat"
                  			DisplayName="Installing IIS:
IIS-WebServer"
                  			InstallCommand="dism.exe /Online
/Enable-Feature /FeatureName:IIS-WebServer"  >
		      	</ExePackage> 

	etc..............................



Thanks George.



-----Original Message-----
From: wix-users [mailto:wix-users-bounces at lists.wixtoolset.org] On Behalf Of
Phill Hogland
Sent: 27 October 2015 16:08
To: WiX Toolset Users Mailing List
Subject: Re: [wix-users] Delay installing (application) pre-requisites

I don't think this runs against the Burn ethos at all, and the SO post is
more confusing than informative.

The 'mbaprereq' installer for Burn, only comes into play when you have a
managed BA application, in which case .Net is needed for the installer to
run.  But all other prereqs, including a different version of .Net than the
version used by the installer, are listed in your bundle chain and
completely under your control as to whether they will be installed.  The
exact approach depends on whether you are using a mba or WixStdBA and other
factors.

I originally used WixStdBA (which is all c++) so there is no .Net dependency
(or wix provided prereq).  I have one app that requires NetFx3 and others
require NetFx4, so in a WixStdBA one approach is to use Variables with
Overwritale="yes" which you BA then sets, to condition your
ExePackage/@InstallCondition using the variables.  For WixStdBA you can use
a BAfunctions.dll for most Detect and Plan scenarios, (or you could write a
c++ BA).  But generally the common approach when more flexibility is needs
is to create a managed ba.  The Setup\WixBA in the wix source is not a
tutorial, but is a functional example that is useful to study.   In my case
I let the wix mbaprereq install the NetFx4.5 that my installer needs (and
most of my apps also need), but I still have the pesky app that needs
NetFx3, which I only install optionally by using PlanPackageBegin handle.
And I take a similar approach for other optional packages (msi or EXE) like
SQL Server.  And if you look at the str
 ucture of other wix based installers, like the ones produced by Microsoft
they also have optional dependencies which are selectable at runtime in a
Burn chain.

-----Original Message-----
From: wix-users [mailto:wix-users-bounces at lists.wixtoolset.org] On Behalf Of
George Legge
Sent: Tuesday, October 27, 2015 10:38 AM
To: wix-users at lists.wixtoolset.org
Subject: [wix-users] Delay installing (application) pre-requisites

Hi,

 

I have been looking around for a solution to this all afternoon and have not
come up with much so far except that what I want to do appears to go against
the whole ethos of Burn.

 

I realise Burn was designed as a bootstrapper to get pre-reqs installed and
found a similar question on Stackoverflow which was pretty much shotdown in
flames
(http://stackoverflow.com/questions/31754761/can-i-install-net-using-wix-wit
hout-creating-a-burn-project)

 

The problem I have is that my application has 2 parts which can be installed
together or on their own. One is a web application and the other an
executable.

 

They each need .Net 4.5 however only one of them requires IIS.

 

So I need the pre-reqs to not be installed until after the user chooses the
options in the UI. So if they choose the exec only, then there is no need to
install IIS at all. The pre-reqs are for our applications and not a pre-req
for the installer.

 

Can this be done and easily and if so, how ? 

 

Hope this makes sense.

 

Thanks, George.

 

 

 

 


____________________________________________________________________
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