[wix-users] COM Object exception
Phill Hogland
phill.hogland at rimage.com
Tue Mar 28 08:42:43 PDT 2017
Not that I know of. The CA is in the MSI. There is no concept of a CA in a bundle. The bundle processes the MsiPackage and whatever is authored in the MSI is processed by msiexec.
________________________________
From: wix-users <wix-users-bounces at lists.wixtoolset.org> on behalf of Alex Tuppen <alex.tuppen at gmail.com>
Sent: Tuesday, March 28, 2017 9:55:50 AM
To: WiX Toolset Users Mailing List
Subject: Re: [wix-users] COM Object exception
Thank you for such a fast and comprehensive reply! Unfortunately even with
verbose logging enabled in the registry (and double checking that that is
working by running the MSI separately) I am not seeing my CA start. Is
there any reason why a CA would work fine when the MSI is run by itself but
not when run from inside a bundle?
Alex
On Tue, 28 Mar 2017 at 15:13 Phill Hogland <phill.hogland at rimage.com> wrote:
There are several approaches to debug a CA.
1) Enable verbose MSI logging either in the registry or on the commandline.
https://support.microsoft.com/en-us/help/223300/how-to-enable-windows-installer-logging
How to enable Windows Installer logging<
https://support.microsoft.com/en-us/help/223300/how-to-enable-windows-installer-logging
>
support.microsoft.com
Windows includes a registry-activated logging service to help diagnose
Windows Installer issues. This article describes how to enable this logging
service.
2) when using Burn pass LOGVERBOSE (with anything) as a MsiProperty of the
MsiPackage. Setting the machine MSI logging policy in the registry to
include *v is equivalent to using LOGVERBOSE, but when LOGVERBOSE is used
without the policy on the CAs get the verbose logging, which may easier to
work with.
3) Set the Environment variable MsiBreak = 'NameOfCustomAction'. Then have
your source project open and when prompted attach to the msiexec process
related to your CA using the PID provided in the dialog.
Here are some other approaches (note Rob's post):
http://windows-installer-xml-wix-toolset.687559.n2.nabble.com/How-to-debug-CustomAction-DLL-td5458781.html
The CA should set a return code.
https://msdn.microsoft.com/en-us/library/windows/desktop/aa368072(v=vs.85).aspx
Custom Action Return Values (Windows)<
https://msdn.microsoft.com/en-us/library/windows/desktop/aa368072(v=vs.85).aspx
>
msdn.microsoft.com
If the msidbCustomActionTypeContinue return processing option is not set,
the custom action must return an integer status code as shown in the
following table.
There are many examples in the wix source code under the src\ext folder.
Phill
wix-users - How to debug CustomAction DLL<
http://windows-installer-xml-wix-toolset.687559.n2.nabble.com/How-to-debug-CustomAction-DLL-td5458781.html
>
windows-installer-xml-wix-toolset.687559.n2.nabble.com
How to debug CustomAction DLL. Dear Wix Experts: We have a CustomAction DLL
written in C. How to debug it? There are a few posts about it: Post1:...
________________________________
From: wix-users <wix-users-bounces at lists.wixtoolset.org> on behalf of Alex
Tuppen <alex.tuppen at gmail.com>
Sent: Tuesday, March 28, 2017 8:44:35 AM
To: WiX Toolset Users Mailing List
Subject: Re: [wix-users] COM Object exception
I have finally had the time to get this working so first a massive thank
you for pointing me in the right direction. However now I cannot work out
how to have the MSI return anything other than an error. I assume that this
is because the MSI is not actually doing anything other than running the
custom action, what is the best way to resolve this?
Alternatively this could be because the CA is erroring and I have not been
able to enable verbose logging of the MSI when running it from within the
bootstrapper (I can see that most of the CA runs outside the bootstrapper
but it relies on some logic in the bootstrapper for a variable so it always
errors outside). Is there a way to force verbose logging while I am
developing?
Thank you,
Alex
On Wed, 22 Feb 2017 at 17:17 Hoover, Jacob <Jacob.Hoover at greenheck.com>
wrote:
> WixStdBA already does this. Have a look @ OnExecuteMsiMessage. Note if you
> want super detailed progress you need a custom them that includes a
> ExecuteProgressActionDataText control.
>
> -----Original Message-----
> From: wix-users [mailto:wix-users-bounces at lists.wixtoolset.org] On Behalf
> Of Alex Tuppen
> Sent: Wednesday, February 22, 2017 3:35 AM
> To: WiX Toolset Users Mailing List <wix-users at lists.wixtoolset.org>
> Subject: Re: [wix-users] COM Object exception
>
> Feedback from the install progress and messages, what is the best way to
> pass that back?
>
> On Tue, 21 Feb 2017 at 23:20 Hoover, Jacob <Jacob.Hoover at greenheck.com>
> wrote:
>
> > Define information? If you are using burn, normally the BA would
> > collect any configuration information and pass it to the MSI as a
> > property. If you are talking about feedback from the install progress
> > and messages, then yes. If you are using DisplayInternalUI then no.
> >
> > -----Original Message-----
> > From: wix-users [mailto:wix-users-bounces at lists.wixtoolset.org] On
> > Behalf Of Alex Tuppen
> > Sent: Tuesday, February 21, 2017 3:38 PM
> > To: WiX Toolset Users Mailing List <wix-users at lists.wixtoolset.org>
> > Subject: Re: [wix-users] COM Object exception
> >
> > That makes sense, is it possible to pass information from an MSI back
> > to bootstrapper for the GUI?
> >
> > On Tue, 21 Feb 2017 at 19:53 Hoover, Jacob
> > <Jacob.Hoover at greenheck.com>
> > wrote:
> >
> > > You could create a MSI with your configuration in it and put it in
> > > the chain after the MMA MSI.
> > >
> > > -----Original Message-----
> > > From: wix-users [mailto:wix-users-bounces at lists.wixtoolset.org] On
> > > Behalf Of Alex Tuppen
> > > Sent: Tuesday, February 21, 2017 1:36 PM
> > > To: WiX Toolset Users Mailing List <wix-users at lists.wixtoolset.org>
> > > Subject: Re: [wix-users] COM Object exception
> > >
> > > Are there any options if the MSI I am installing is not one that I
> > > have made? I looked at custom actions but I can't run those in the
> > > bundle itself. Basically I am just installing the MMA and then
> > > configuring it to point to Azure where the actual work is done
> > > (hence why I am not installing anything that i have written).
> > >
> > > On Tue, 21 Feb 2017 at 17:54 Phill Hogland
> > > <phill.hogland at rimage.com>
> > > wrote:
> > >
> > > > A BA should not try to implement any configuration changes. You
> > > > might look at using a DTF CA in a chained MSI or as there is a
> > > > similar PowerShell script posted in the following link then
> > > > consider using the
> > > Wix PSExtension.
> > > >
> > > > ________________________________
> > > > From: wix-users <wix-users-bounces at lists.wixtoolset.org> on behalf
> > > > of Alex Tuppen <alex.tuppen at gmail.com>
> > > > Sent: Tuesday, February 21, 2017 10:37:54 AM
> > > > To: wix-users at lists.wixtoolset.org
> > > > Subject: [wix-users] COM Object exception
> > > >
> > > > Hi,
> > > >
> > > > I was wondering if there is anything that I need to do to be able
> > > > to use a COM object from within a custom bootstrapper. I have the
> > > > same COM object working outside the bootstrapper but no matter
> > > > what I try it always throws an exception when the bootstrapper tries
> to use it.
> > > >
> > > > The COM object in question is for the Microsoft Monitoring Agent
> > > > and is registered when the MMA is installed. I am attempting to
> > > > use it with the following code:
> > > >
> > > > public async Task<string> ConfigureOMSAgent()
> > > > {
> > > > return await Task.Run(() =>
> > > > {
> > > > try
> > > > {
> > > > // Load COM object
> > > > Bootstrapper.Engine.Log(LogLevel.Verbose,
> > > > "Loading ManagementServiceConfiguration COM object");
> > > >
> > > > AgentConfigManagerLib.ManagementServiceConfiguration
> > > > mgmntSrvCnfg = new
> > > AgentConfigManagerLib.ManagementServiceConfiguration();
> > > > // Configuring MMA as OMS agent
> > > > Bootstrapper.Engine.Log(LogLevel.Verbose,
> > > > "Configuring MMA as OMS agent");
> > > > mgmntSrvCnfg.AddCloudWorkspace(WorkSpaceID,
> > > > WorkSpaceKey);
> > > > // Return empty string indicating success
> > > > return string.Empty;
> > > > }
> > > > catch (Exception e)
> > > > {
> > > > ErrorThrown(e.Message);
> > > > return e.Message;
> > > > }
> > > > });
> > > > }
> > > >
> > > > Any help will be amazing!
> > > >
> > > > Thank you,
> > > >
> > > > Alex
> > > >
> > > > __________________________________________________________________
> > > > __ 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/
> > >
> >
> > ____________________________________________________________________
> > 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/
>
____________________________________________________________________
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