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

create event log source during installation

Mon Oct 05, 2009 8:10 am

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

Mon Oct 05, 2009 11:45 am

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

Fri May 27, 2016 8:50 pm

For your example, can you please clarify how to configure the 'launch file' properties..
Untitled.png
Untitled.png (45.15KiB)Viewed 14756 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

Mon May 30, 2016 9:01 am

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

Thu Jun 02, 2016 5:42 pm

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

Fri Jun 03, 2016 6:41 am

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

Fri Jul 20, 2018 1:24 pm

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.07KiB)Viewed 11527 times

Eusebiu
Posts: 4931
Joined: Wed Nov 14, 2012 2:04 pm

Re: create event log source during installation

Mon Jul 23, 2018 8:44 am

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”