Todd Ropog
Todd Ropog

Reputation: 1142

How to change event log properties from WiX script?

Our WiX script currently creates an event log source using the method described here.

However, the log is created with default values for the Maximum log size and how it behaves when the log is full (e.g. Overwrite events as needed).

Is there an easy way to change those values when creating the source? I'm guessing it would require creating a custom action, but I'm wondering if there's an easier way or if such an action already exists.

Upvotes: 3

Views: 1174

Answers (1)

Zach Young
Zach Young

Reputation: 11178

I've looked in the WiX CHM and did not see a field for specifying the maximum log size and how it behaves when full. But, I did find this entry which I think will help, and allow you to skip using a custom action: http://www.mail-archive.com/[email protected]/msg02026.html

So, I think for you:

  1. Create the EventSource, possibly in the registry (HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Eventlog), and configure it to your liking
  2. Export the key
  3. Use the program listed here to convert the REG file to a WiX authoring: How to generate WiX XML from a .reg file?

Upvotes: 4

Related Questions