I need to know the application's ProductCode in the Installer.OnCommitted callback. There doesn't seem to be an obvious way of determining this.
views:
804answers:
3
A:
The MSI function MsiGetProperty can be used to get the name of the ProductCode property. I don't know if that would work in this case, since I've never created a .NET installer.
Chris Tybur
2008-09-14 02:24:02
+1
A:
I ended up passing the product code as a command line argument to my Installer class using the CustomActionData property in Visual Studio (e.g. /productcode={31E1145F-B833-47c6-8C80-A55F306B8A6C}. I can then access this from any callback within the Installer class using the Context.Parameters StringDictionary
string productCode = (string)Context.Parameters["productcode"];
No need to cast to a string, as it's alreay a string
Cocowalla
2010-04-17 19:01:34