PDA

View Full Version : Windows Event Log



Unregistered
03-19-2006, 01:02 PM
I have a Windows Service application I'm writing in Visual Studio 2003 and .NET 1.1. I want to install an event log for my service - so that if the user runs uninstall, it will remove the event log. I can do this using the VS setup tools.

1) I know I can install a service with SB, is there any issue with installing a service written in .NET?

2) I don't see anything about setting up event logs in SB docs. What's the easiest way to do this?

linder
03-20-2006, 09:03 AM
Hello,

1) It should be possible to install services written in .NET. Did you experience any problem with this function?

2) Good question. At the moment you can only use the "Send OutputDebugString" script function to send a string to an external debugger for display.

For example:
http://www.sysinternals.com/Utilities/DebugView.html

We are working on extended Event Logging to provides a standard way for installation executables to record important software installation events.

It will also be possible to register an event log and report an event.

Please let me know if you have any further questions.

Unregistered
03-20-2006, 11:13 AM
Hello,

1) It should be possible to install services written in .NET. Did you experience any problem with this function?


No I haven't tried it, was just verifying that it should work, thanks.

On the event log, I guess I wasn't totally clear. I was referring to creating a custom Windows event log and registering a source. I did some more research on this, and it seems that it can be created pretty easily from a vbscript script, which I know I can call from SB. So perhaps this is the best way?

linder
03-20-2006, 11:36 AM
Hello,

Yes, you can use a vbscript for now. But we'll add this as a built-in feature to the next build (inspired by your post, very good idea, btw.). It will be available as a script command (RegisterEventSource, ReportEvent, etc.).

Thanks,