[wix-users] How can a standard bootstrapper detect an MS Update?

Phill Hogland phill.hogland at rimage.com
Mon Dec 19 05:40:59 PST 2016


Custom actions are processed in an MSI by msiexec.  They are not included in a Burn bootstrapper project.  A bootstrapper project can use either the WixStandardBA or you can create a custom BA (managed or native).  The BA does not run elevated, but you are free to run any code you wish in a custom BA using the user context which launched the bootstrapper.  If using the WixStandardBA you can add a C++ bafunctions.dll and in wix 3.10 hook into a limited number of Startup, Detect, and Plan handlers to execute code to detect configurations and make planing decisions.  There is a sample BA functions DLL in the wix3 source under the burn folder.  I understand that there are plans for wix4 to expand some of the bafunctions.dll hooks.


I believe that there is also a way to add a configuration application to the end of a bundle's chain, which will then be launched elevated to implement configuration customization.  Look at ApprovedExeForElevation in the wix3 online docs:

http://wixtoolset.org/documentation/manual/v3/xsd/wix/approvedexeforelevation.html


Another approach which I have used in some scenarios is to divide my concerns into multiple child (or 'addon') bundles.  So you might have a bundle which includes a MSI which during the elevated Apply phase, in addition to it basic function of installing some application, executes a CA which collects some configuration information and writes it to a registry key (or file) at some 'common' location of your choice.  Then later in the bundle chain (or as a separate 'addon' bundle) include another bundle which reads that location and in the BA does the additional processing which could not be done in the CA, to then pass some property to to a MSI in that bundles chain.  You can either nest this child bundle in the chain of the parent bundle or deploy it as a separate 'addon' bundle.


The key is to be aware that anything you do in the detect and planing phases of a bundle should not require any elevation and should not make any changes to the target system.  But that leaves the door open for many different approaches to customizing a solution.

________________________________
From: wix-users <wix-users-bounces at lists.wixtoolset.org> on behalf of erwin john publico <erwinjohnpublico at yahoo.com>
Sent: Sunday, December 18, 2016 10:34:59 PM
To: Joel Budreau; WiX Toolset Users Mailing List
Subject: Re: [wix-users] How can a standard bootstrapper detect an MS Update?

Command line commands and custom actions can only be executed by Wix Setups and not by Wix Bootstrapper right? Are there other extensions for the standard bootsrapper to achieve this?

    On Saturday, December 17, 2016 4:03 AM, Joel Budreau <joel.budreau at gmail.com> wrote:


 I'm sure there's an API to handle this, but you could also create a pipe to execute the commands listed here and then parse the output - http://serverfault.com/questions/263847/how-can-i-query-my-system-via-command-line-to-see-if-a-kb-patch-is-installed.
Look here for some example code on how to execute a command and parse the output in C++ - https://msdn.microsoft.com/en-us/library/96ayss4b.aspx.
On Fri, Dec 16, 2016 at 2:28 AM, erwin john publico <erwinjohnpublico at yahoo.com> wrote:

Hi All,
I started using the UtilExtension and used a RegistrySearch to search for KB3033929. It was later found that there are ways(Windows 7 Convenience Rollup Packages) where this update can be installed without the registry being made in:SOFTWARE\Microsoft\Windows\ CurrentVersion\Component Based Servicing\Packages\Package_ for_KB3033929_SP1~ 31bf3856ad364e35~amd64~~6.1.1. 1
Is there a way for a standard bootstrapper to detect a MS Update, or to just this specific KB3033929?
Thanks,Erwin

______________________________ ______________________________ ________
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