This website uses cookies. By clicking Accept, you consent to the use of cookies. Click Here to learn more about how we use cookies.
Turn on suggestions
Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.
- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- Re: Logging from inside Managed Custom Actions.
Subscribe
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Oct 31, 2013
09:35 AM
Logging from inside Managed Custom Actions.
Hello,
I'm trying to add logging to my managed (C#) custom actions.
The log reports that the custom action is called. But nothing is logged from inside the managed code.
I created a small function to illustrate...
A snippet from the log is shown below.
MSI (c) (98:B0) [14:26:38:656]: Doing action: TestLogging
Action 14:26:38: TestLogging.
Action start 14:26:38: TestLogging.
MSI (c) (98:1C) [14:26:38:665]: Invoking remote custom action. DLL: C:\Users\JASON~1.HAU\AppData\Local\Temp\MSIC2E4.tmp, Entrypoint: m2
Action ended 14:26:39: TestLogging. Return value 1.
Any ideas why my message does not appear?
I'm trying to add logging to my managed (C#) custom actions.
The log reports that the custom action is called. But nothing is logged from inside the managed code.
I created a small function to illustrate...
public void TestLogging(int handle, string msg)
{
using (Msi.Install install = Msi.CustomActionHandle(handle))
{
Msi.Record record = new Msi.Record(1);
//record.SetString(0, msg);
record.SetString(0, "Hello World...!");;
install.ProcessMessage(Msi.InstallMessage.Info, record);
}
}
A snippet from the log is shown below.
MSI (c) (98:B0) [14:26:38:656]: Doing action: TestLogging
Action 14:26:38: TestLogging.
Action start 14:26:38: TestLogging.
MSI (c) (98:1C) [14:26:38:665]: Invoking remote custom action. DLL: C:\Users\JASON~1.HAU\AppData\Local\Temp\MSIC2E4.tmp, Entrypoint: m2
Action ended 14:26:39: TestLogging. Return value 1.
Any ideas why my message does not appear?
(4) Replies
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Nov 01, 2013
07:44 AM
I guess this is not possible. See
http://kb.flexerasoftware.com/selfservice/microsites/search.do?cmd=displayKC&docType=kc&externalId=http--communityflexerasoftwarecom-archive-indexphpt-192340html&sliceId=&docTypeID=DT_MACROVISIONCOMMUNITY_1_1&dialogID=160836749&stateId=0%200%20160832727
Odd how the methods are exposed, but unusable.... :confused:
http://kb.flexerasoftware.com/selfservice/microsites/search.do?cmd=displayKC&docType=kc&externalId=http--communityflexerasoftwarecom-archive-indexphpt-192340html&sliceId=&docTypeID=DT_MACROVISIONCOMMUNITY_1_1&dialogID=160836749&stateId=0%200%20160832727
Odd how the methods are exposed, but unusable.... :confused:
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Nov 01, 2013
11:19 AM
Unless I'm missing something, Managed actions don't fit well with Installshield.:mad:
The suggested work-around, changing a property in the managed custom action in order for the change in value to be logged, does not work for me.....
What am I doing wrong?????
The suggested work-around, changing a property in the managed custom action in order for the change in value to be logged, does not work for me.....
What am I doing wrong?????
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Nov 04, 2013
10:25 AM
How are you generating your log - namely are you specifying v of /l*v (or of voicewarmup, depending on context)? I believe only verbose logs contain property change information.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
‎Nov 04, 2013
09:17 PM
Logging from managed c# custom actions is easy:
You just have to be using the right tools. The tool I'm thinking of is completely compatible with Windows Installer and therefore InstallShield. I don't care who made the tool.... I only care about efficiently making bulletproof installers.
session.Log("Hello World");
You just have to be using the right tools. The tool I'm thinking of is completely compatible with Windows Installer and therefore InstallShield. I don't care who made the tool.... I only care about efficiently making bulletproof installers.