jrahma
Posts: 51
Joined: Wed Jan 07, 2009 11:56 am

create event log source during installation

I have the following problem in my C# application when I try to first run it.. is it possible to create the event source during the installation using Advanced Installer?

http://social.msdn.microsoft.com/Forums ... e2185346e/
GabrielBarbu
Posts: 2146
Joined: Thu Jul 09, 2009 11:24 am
Contact: Website

Re: create event log source during installation

Hello,

You can use the Launch File or Open URL custom action to create a new event log source:

Code: Select all

eventcreate /ID 1 /L APPLICATION /T INFORMATION /SO MYEVENTSOURCE /D "My first log"
This would create an event source under the APPLICATION event log, of type INFORMATION and with the name MYEVENTSOURCE. For information on how to use the eventcreate utility you can check the microsoft's technet page on Eventcreate

Please note that the custom action needs to be set as "Deferred with no impersonation", since it needs administrator privileges to create the event source.

Regards,
Gabriel
Gabriel Barbu
Advanced Installer Team
http://www.advancedinstaller.com/
angus_oliver
Posts: 8
Joined: Thu Mar 20, 2014 1:33 pm

Re: create event log source during installation

For your example, can you please clarify how to configure the 'launch file' properties..
Untitled.png
Untitled.png (45.15 KiB) Viewed 14915 times
I am at the stage of what the attachment shows!
Thanks
Eusebiu
Posts: 4931
Joined: Wed Nov 14, 2012 2:04 pm

Re: create event log source during installation

Hi,

The UI of the "Launch file" custom action has changed a bit since that solution was written on this thread. So, in order to have this working you can configure your custom action as in the example below:
  • File to launch: eventcreate
    Command line: /ID 1 /L APPLICATION /T INFORMATION /SO MYEVENTSOURCE /D "My first log"

    Uncheck the "Run as Administrator" option
Just let us know if you encounter any problem.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
angus_oliver
Posts: 8
Joined: Thu Mar 20, 2014 1:33 pm

Re: create event log source during installation

Works like a charm. Thanks very much.
Eusebiu
Posts: 4931
Joined: Wed Nov 14, 2012 2:04 pm

Re: create event log source during installation

You're welcome. I'm glad you got this working.

Just let us know anytime you need help.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
cristian.bejenariu
Posts: 1
Joined: Fri Jul 20, 2018 1:19 pm

Re: create event log source during installation

Is there any way of debugging this Launch File option? I'm having this problem and I don't know what the problem is.

Thanks.
Attachments
Screen Shot 2018-07-20 at 15.19.28.png
Screen Shot 2018-07-20 at 15.19.28.png (232.07 KiB) Viewed 11686 times
Eusebiu
Posts: 4931
Joined: Wed Nov 14, 2012 2:04 pm

Re: create event log source during installation

Hi and welcome to our forums.

In order to get more details about an installation failure you can create a verbose log using the "/L*V <path_to_log>" command line.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Feature Requests”