[wix-users] Burn Bundle Status Query

Hoover, Jacob Jacob.Hoover at greenheck.com
Thu Dec 3 11:16:00 PST 2015


Wix doesn't publish a binary for doing this directly, as there were some reservations on what if the underlying storage would change.  As long as you know which version of WiX the bundle is using, then DUtil is the way to go.  I don't think the layout has changed since burn was introduced, so for now you'd be safe.  The bigger concern is trying to be both forward and backward compatible in a dll form, to handle all versions, which currently we don't address.

I use a simple wrapper DLL on DUtil, as I have to consume this outside of C++.  For that, I have a tiny C++ DLL which does:

#include "stdafx.h"
#include "WixUtil.h"

#pragma comment(lib, "dutil.lib")

HRESULT DAPI WixBundleGetBundleInfo(
      __in LPCWSTR   szBundleId,                             // Bundle code
      __in LPCWSTR   szAttribute,                            // attribute name
      __out_ecount_opt(*pcchValueBuf) LPWSTR lpValueBuf,     // returned value, NULL if not desired
      __inout_opt                     LPDWORD pcchValueBuf   // in/out buffer character count
        )
{
    return BundleGetBundleInfo(szBundleId, szAttribute, lpValueBuf, pcchValueBuf);
}

HRESULT DAPI WixBundleEnumRelatedBundle(
          __in     LPCWSTR lpUpgradeCode,
          __in     BUNDLE_INSTALL_CONTEXT context,
          __inout  PDWORD pdwStartIndex,
          __out_ecount(MAX_GUID_CHARS+1)  LPWSTR lpBundleIdBuf
            )
{
    return BundleEnumRelatedBundle(lpUpgradeCode, context, pdwStartIndex, lpBundleIdBuf);
}

With the 2 wrapper methods exported via a def

LIBRARY

EXPORTS
    WixBundleGetBundleInfo
    WixBundleEnumRelatedBundle



-----Original Message-----
From: wix-users [mailto:wix-users-bounces at lists.wixtoolset.org] On Behalf Of Bob Arnson
Sent: Tuesday, December 01, 2015 10:40 PM
To: WiX Toolset Users Mailing List <wix-users at lists.wixtoolset.org>
Subject: Re: [wix-users] Burn Bundle Status Query

There are functions in the DUtil library for querying installed bundles.

> -----Original Message-----
> From: wix-users [mailto:wix-users-bounces at lists.wixtoolset.org] On 
> Behalf Of Colin Sim
> Sent: Sunday, 29 November, 2015 14:01
> To: WiX Toolset Users Mailing List <wix-users at lists.wixtoolset.org>
> Subject: [wix-users] Burn Bundle Status Query
> 
> With MSIs, Windows provide various installer functions to query an MSI 
> and its status on a system, e.g. functions that start with Msi* such 
> as MsiEnumRelatedProducts, which allows us to determine whether a 
> product is installed. There are also APIs to query an MSI to extract, 
> for example, its upgrade code.
> 
> 
> 
> I would like to confirm that there are no equivalent  APIs for the WiX 
> bundle (EXEs)? That is, there is no meaningful way to determine the 
> upgrade code for a WiX bundle and the only way to check if a bundle is 
> installed is to search through the 
> HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall?
> 
> 
> This e-mail contains IPFX information which may be privileged or 
> confidential and is intended for use only by the individual(s) or 
> entity named above. If you are not the intended recipient, note that 
> disclosing, copying, distributing or using this information is 
> prohibited. If you have received this e-mail in error, please advise 
> immediately to the e-mail address above and permanently delete this 
> message and any attachments. Please note that any views or opinions 
> presented in this email are solely those of the author and do not 
> necessarily represent those of the company. We monitor our e-mail system and may record your e-mails. Thank you.
> 
> __________________________________________________________
> __________
> 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