PDA

View Full Version : Create Event Source



Hubert
06-13-2010, 07:25 AM
I'd like to have the setup operation for our system do two things:

a) add a permission to a registry key
b) create an event source

naturally, we want to reverse b) when we do an uninstall (step a) doesn't need to be reversed because the registry key is already deleted when we do an uninstall).

Can we do b) in script?

Thanks

linder
06-14-2010, 12:28 AM
Hello,

a) You can use the "Set Access Control..." script function to add permission to a registry key.
b) If you know how to do this from an application, you can develop a DLL and call it from your installer/uninstall.

-or-

Use "eventcreate" from the "Run Command Line..." script function:

eventcreate /ID 1 /L APPLICATION /T INFORMATION /SO MYEVENTSOURCE /D "My first log"

This will create a new event source named "MYEVENTSOURCE" under APPLICATION event log as INFORMATION event type.

http://technet.microsoft.com/en-us/library/bb490899.aspx

Hope this helps.

Friedrich