Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8568591
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T18:08:46+00:00 2026-06-11T18:08:46+00:00

This is an intentional semi-duplicate of How do you create an event log source

  • 0

This is an intentional semi-duplicate of How do you create an event log source using WiX and WIX: Create EventSource using .NET message file.

My first question is, does it really have to be so complicated? Isn’t there some way to simply specify to WiX, “my program is a .Net program, and it needs to write to the event log – please do the necessary setup”?

OK, assuming that isn’t possible, I’d like to receive any recommendations for the necessary WiX statements to make it work, irrespective of which version of .Net Framework is installed, and irrespective of whether it is a 32 or 64-bit system. After all, most of my .Net programs are able to run on .Net 2.0 or later, and on either 32 or 64-bit, so it shouldn’t matter.

Final question: Is there any way to make it future-proof? It would be nice if the MSI files I generate today will still work in five years, even if .Net CLR 2.0 and 4.0 have both been relegated to the dustbin in Windows 11 or whatever it’s called then.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-11T18:08:48+00:00Added an answer on June 11, 2026 at 6:08 pm

    As requested. A solution that works on .NET 4 full and .NET 4 client profile using UtilExtension:

    1) Add these PropertyRef’s:

    <PropertyRef Id="NETFRAMEWORK40FULLINSTALLROOTDIR"/>
    <PropertyRef Id="NETFRAMEWORK40FULLINSTALLROOTDIR64"/>
    <PropertyRef Id="NETFRAMEWORK40CLIENTINSTALLROOTDIR"/>
    <PropertyRef Id="NETFRAMEWORK40CLIENTINSTALLROOTDIR64"/>
    

    2) 32 bit part:

    <!-- Event Source creation for 32bit OS with .NET 4 Full-->
    <Component Id="CreateEventSource32BitFullNet4" Guid="your-guid-here">
        <Condition><![CDATA[NETFRAMEWORK40FULLINSTALLROOTDIR AND NOT VersionNT64]]></Condition>
        <CreateFolder/>
        <!-- Create an Event Source -->
        <Util:EventSource
              xmlns:Util="http://schemas.microsoft.com/wix/UtilExtension"
              Name="YOUR APP NAME"
              Log="Application"
              EventMessageFile="[NETFRAMEWORK40FULLINSTALLROOTDIR]EventLogMessages.dll"/>
    </Component>
    
    <!-- Event Source creation for 32bit OS with .NET 4 Client Profile-->
    <Component Id="CreateEventSource32BitClientNet4" Guid="your-guid-here">
        <Condition><![CDATA[NETFRAMEWORK40CLIENTINSTALLROOTDIR AND NOT VersionNT64]]></Condition>
        <CreateFolder/>
        <!-- Create an Event Source -->
            <Util:EventSource
              xmlns:Util="http://schemas.microsoft.com/wix/UtilExtension"
              Name="YOUR APP NAME"
              Log="Application"
              EventMessageFile="[NETFRAMEWORK40CLIENTINSTALLROOTDIR]EventLogMessages.dll"/>
    </Component>
    

    3) 64 bit part:

    <!-- Event Source creation for 64bit OS with .NET 4 Full -->
    <Component Id="CreateEventSource64BitFullNet4" Guid="your-guid-here">
        <Condition><![CDATA[NETFRAMEWORK40FULLINSTALLROOTDIR64 AND VersionNT64]]></Condition>
        <CreateFolder/>
        <!-- Create an Event Source -->
        <Util:EventSource
              xmlns:Util="http://schemas.microsoft.com/wix/UtilExtension"
              Name="YOUR APP NAME"
              Log="Application"
              EventMessageFile="[NETFRAMEWORK40FULLINSTALLROOTDIR64]EventLogMessages.dll"/>
    </Component>
    
    <!-- Event Source creation for 64bit OS with .NET 4 Client Profile -->
    <Component Id="CreateEventSource64BitClientNet4" Guid="your-guid-here">
        <Condition><![CDATA[NETFRAMEWORK40CLIENTINSTALLROOTDIR64 AND VersionNT64]]></Condition>
        <CreateFolder/>
        <!-- Create an Event Source -->
        <Util:EventSource
              xmlns:Util="http://schemas.microsoft.com/wix/UtilExtension"
              Name="YOUR APP NAME"
              Log="Application"
              EventMessageFile="[NETFRAMEWORK40CLIENTINSTALLROOTDIR64]EventLogMessages.dll"/>
    </Component>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Is this behavior intentional? //create the same URI using two different constructors URI foo
On an iPad using Safari, go to this page: http://ifelse.org/projects/errors/viewport/test.html This is the Source:
Possible Duplicate: Why does this intentionally incorrect use of strcpy not fail horribly? Below
Consider this bit of obfuscated code. The intention is to create a new object
this is my first question in here, and I would like to ask if
Using XScalaWT , this compiled under Scala 2.7: class NodeView(parent: Composite) extends Composite(parent) {
I've been using Clojure for a little while and want to create some projects
Note first of all that this question is not tagged winforms or wpf or
Given this example taken from http://php.net/manual/en/function.crypt.php crypt('rasmuslerdorf', '$2a$07$usesomesillystringforsalt$') Firstly: What is the length that
I am trying to implement a simple wordcount in scala using an immutable map(this

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.