I'm not sure what you are trying to achieve, the windows installer service
already logs during these events and you can write to the log from custom
actions...

All you need to do is pass the /l parameter...

See also
http://support.microsoft.com/kb/223300


-----Original Message-----
From: Hareendra Ikkurthi (Accenture) [mailto:v-hai...@microsoft.com] 
Sent: 04 March 2011 13:51
To: General discussion for Windows Installer XML toolset.
Subject: [WiX-users] Can a Custom Actions be reused?

Hi,

I'm trying to implement a Wix custom logging mechanism in our existing Wix
Setup project. To do this....
I have written a Logger.exe using a C#. It takes command line string and logs
in to file.
I have created a custom action to invoke the Logger.exe with command line
string, using WixCA  and sequenced as shown below.

<?xml version="1.0" encoding="utf-8"?>
<Include>
  <CustomAction Id="LoggMyMessage" Property="LogMessage"
Value="&quot;D:\MyProjects\Logger\Logger\bin\Debug\Logger.exe&quot;
&quot;[CustomMessage]&quot;" Execute="immediate" />
  <CustomAction Id="LogMessage"  BinaryKey="WixCA" DllEntry="CAQuietExec"
Execute="deferred" Return="check" Impersonate="yes" />
  <InstallExecuteSequence>
   <Custom Action="LoggMyMessage" Before="InstallFiles"/>
    <Custom Action="LogMessage" After="InstallFiles">Not Installed</Custom>
  </InstallExecuteSequence>
</Include>

Now I want to re-use the same custom action during ....

*         Database installation

*         Service installation

*         whenever there is an error.
Can anyone suggest how can I reuse my custom actions to get invoked and log
the message into the log file.


Thanks & Regards,
Hareendra.



-----------------------------------------------------------------------------
-
What You Don't Know About Data Connectivity CAN Hurt You
This paper provides an overview of data connectivity, details
its effect on application quality, and explores various alternative
solutions. http://p.sf.net/sfu/progress-d2d
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users
SDL PLC confidential, all rights reserved.
If you are not the intended recipient of this mail SDL requests and requires 
that you delete it without acting upon or copying any of its contents, and we 
further request that you advise us.
SDL PLC is a public limited company registered in England and Wales.  
Registered number: 02675207.
Registered address: Globe House, Clivemont Road, Maidenhead, Berkshire SL6 7DY, 
UK.


------------------------------------------------------------------------------
What You Don't Know About Data Connectivity CAN Hurt You
This paper provides an overview of data connectivity, details
its effect on application quality, and explores various alternative
solutions. http://p.sf.net/sfu/progress-d2d
_______________________________________________
WiX-users mailing list
WiX-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wix-users

Reply via email to