Roman Posted February 16, 2006 Share Posted February 16, 2006 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. I surrend... Any suggestions? Thanks, Roman. Link to comment Share on other sites More sharing options...
seandisanti Posted February 16, 2006 Share Posted February 16, 2006 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. I surrend... Any suggestions? Thanks, Roman.have you tried just @LF ? Link to comment Share on other sites More sharing options...
Roman Posted February 17, 2006 Author Share Posted February 17, 2006 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. Link to comment Share on other sites More sharing options...
seandisanti Posted February 17, 2006 Share Posted February 17, 2006 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) Link to comment Share on other sites More sharing options...
seandisanti Posted February 17, 2006 Share Posted February 17, 2006 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 Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now