Sign in to follow this  
Followers 0
roman

Writing to Windows Eventlog using "Logevent.exe"

5 posts in this topic

Hi

I have a little problem i can't resolve:

From the Microsoft Ressource Kit i use "Logevent.exe" (a command line tool) to write my events to the Windows eventlog.

If i do it like this:

RunWait(@COMSPEC & " /c Logevent.exe -s E -r ""MyEvent"" -e 10001 ""My message...""")

all works well!

But now i would like to have a carriage return / line feed befor "My message..." appears to get my text on a new line within the event log. I tryed to implement @CRLF in various ways but without success. :o

I surrend...

Any suggestions?

Thanks, Roman.

Share this post


Link to post
Share on other sites



Hi

I have a little problem i can't resolve:

From the Microsoft Ressource Kit i use "Logevent.exe" (a command line tool) to write my events to the Windows eventlog.

If i do it like this:

RunWait(@COMSPEC & " /c Logevent.exe -s E -r ""MyEvent"" -e 10001 ""My message...""")

all works well!

But now i would like to have a carriage return / line feed befor "My message..." appears to get my text on a new line within the event log. I tryed to implement @CRLF in various ways but without success. :o

I surrend...

Any suggestions?

Thanks, Roman.

have you tried just @LF ?

1100111 00001011101111 00011101101111 00010111100100 00001111110100 00110111110010 00101101111001 0011100i didn't make up this form of encryption, but i like it.credit to the lvl 6 challenge on arcanum.co.nz

Share this post


Link to post
Share on other sites

have you tried just @LF ?

Yes, without success - but your suggestion goes in the right direction: is it possible that a carriage return does "survive" within a parameter of a command-line tool? I don't belive it...

Therefore i think i have to live with it or to change to kiXtart. :">

Thanks, Roman.

Share this post


Link to post
Share on other sites

Yes, without success - but your suggestion goes in the right direction: is it possible that a carriage return does "survive" within a parameter of a command-line tool? I don't belive it...

Therefore i think i have to live with it or to change to kiXtart. :">

Thanks, Roman.

i think you're right, i'm going to test a possible work around (would explain it but i don't want to get your hopes up)


1100111 00001011101111 00011101101111 00010111100100 00001111110100 00110111110010 00101101111001 0011100i didn't make up this form of encryption, but i like it.credit to the lvl 6 challenge on arcanum.co.nz

Share this post


Link to post
Share on other sites

i think you're right, i'm going to test a possible work around (would explain it but i don't want to get your hopes up)

yeah, it looks like you just have to work within the constraints of a single line log, or create your own log. _FileWriteLog() is what i usually use rather than using the built in event logging of windows. then you don't have to worry about using a runasset() or anything else like that either

1100111 00001011101111 00011101101111 00010111100100 00001111110100 00110111110010 00101101111001 0011100i didn't make up this form of encryption, but i like it.credit to the lvl 6 challenge on arcanum.co.nz

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0