There are plenty of .NET libraries out there. The "worst" ones use MSI.DLL as a 
COM reference and it's often unreliable because those interfaces are basically 
intended for late-binding using the installer's scripting model. The best ones 
(like Richard's) are just C# source code with P/Invoke to the Msi** Win32 API 
calls. The Win32 API has all you need, it's a just a matter of getting the 
P/Invoke calls right. 

The approach I've worked on is to use Windows .NET forms to wrap one or MSI 
(silent) installs and make it look like one product in Add/Remove Programs. The 
entire thing is driven with an Xml file that lists the forms you want to show, 
the MSI files to install, and the feature tree you want to see with some info 
about which MSI file the feature is in. The point is to be able to manage a 
collection of MSIs as if it's one product. Somewhere in MSDN there's a C++ 
example showing use of MsiSetExternalUIRecord to do an install and collect 
records to show in your UI, also an example with MsiSetExternalUI. 

Phil Wilson 


-----Original Message-----
From: Nick Ball [mailto:nick.b...@grantadesign.com] 
Sent: Wednesday, August 12, 2009 8:17 AM
To: wix-users@lists.sourceforge.net
Subject: Re: [WiX-users] External Installer App with UI quietly controlling 
MSIinstallation

I'd be interested to hear how other do this too. I've been investigating
this a bit, and I believe that certain installers, such as MS Expression
and MS Office, I think, use WiX to generate MSI's and then hook it
together with their own UI. I think Expression's installation UI is
written in WPF. 

Is there a .Net library out there to hook into Msi calls? That would be
very handy indeed. 

-Nick


Hi,
I'm planning to move all my installation UI from MSI into a Delphi
application (because of custom controls, better feature selection
presentation, custom driver installation, etc.) and I'm trying to find
out, how to enumerate list of features available in the MSI and then how
to install only features selected by the user (and optionally to custom
folders).

In MSDN article "Installing an Application" 
http://msdn.microsoft.com/en-us/library/aa369508(VS.85).aspx
<http://msdn.microsoft.com/en-us/library/aa369508%28VS.85%29.aspx> there
are only two steps:
1) call MsiInstallProduct("pathToMsi", "property1=value
property2=value")
2) call MsiConfigureProduct("???", INSTALLLEVEL_DEFAULT,
INSTALLSTATE_LOCAL)

And I'd like to have better control over what is happening during the
installation.

My problems:
1) How can I get list of available features from the MSI package? 
(MsiEnumFeatures requires szProduct and not hProduct obtained from
MsiOpenPackage)
2) How can I get szProduct parameter for MsiConfigureProduct? For MSI
creation I'm using automatically generated GUIDs by WiX.
3) Is there any better way how to set installation parameters then using
many properties on the "command line" parameter of MsiInstallProduct? 
Especially I would like to set the Feature states (about 20 modules x 10
languages) and target directories.
4) How can I implement installation modification? Using
MsiConfigureFeature or MsiSetFeatureState?

The uninstallation will be completely handled by MSI with no UI.

Thank you for any advice
Ondrej Zarevucky


------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users



------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to