3

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.

1 Answer 1

4

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?
Sign up to request clarification or add additional context in comments.

3 Comments

Unfortunately this seems to require a reboot for the changes to be applied, which I'd like to avoid. The System.Diagnostics.EventLog object can modify the values without requiring a reboot. I was hoping to find a way to do that, but it looks like writing my own custom action might be the only option.
@ToddRopog If you end up creating a custom action, could you share it here, please?
@OndrejJanacek Sorry, I don't think I ever did, but I haven't used WiX in a long time.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.