[wix-users] COM Object exception
Phill Hogland
phill.hogland at rimage.com
Tue Feb 21 09:46:02 PST 2017
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/
More information about the wix-users
mailing list