Hi,
I'm trying to put together a simple managed custom action using DTF which
will show each of the features, their descriptions, and their cost. It
seemed straight forward enough
string msg = "";
foreach (FeatureInfo fi in session.Features)
{
msg += string.Format
(
"Title: {0}\r\nDescription: {1}\r\nCost: {2}\r\n\r\n",
fi.Title,
fi.Description,
fi.GetCost(false, true, InstallState.Local)
);
}
MessageBox.Show(msg,"Features");
However, fi.Title thows the exception:
System.Reflection.TargetInvocationException: Exception has been thrown by
the target of an invocation. --->
Microsoft.Deployment.WindowsInstaller.InvalidHandleException: The handle is
invalid.
at Microsoft.Deployment.WindowsInstaller.FeatureInfo.get_Title()
I get a similar error for fi.Description. For fi.GetCost for one of my 3
features it returns 0, for the others it returns -1099511627776 (=-1TB).
I'm probably missing something obvious here but I can't seem to put my
finger on it. I have my custom task scheduled as follows:
<InstallUISequence>
<Custom Action="ShowFeatures" After="CostFinalize" />
</InstallUISequence>
Any ideas?
I am able to query the title and description directly with View v =
Session.Database.OpenView("SELECT * FROM Feature ORDER BY Display"); I am
also able to access FeatureInfo.RequestState and FeatureInfo.CurrentState
without exception.
Thanks,
Shawn
------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
WiX-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/wix-users