myITforum.com Community Forum myITforum.com Community Forum

Home  Forums  Blogs  Live Support chat  Search Articles  Wiki  FAQ  Email Lists  Register  Login  My Profile  Inbox  Address Book  My Subscription  My Forums 

Photo Gallery  Member List  Search  Calendars  FAQ  Ticket List  Log Out

All Forums RSS Feed Subscription:


  


Help with script to create an Event

 
View related threads: (in this forum | in all forums)

Logged in as: Guest
  Printable Version
All Forums >> [Scripting Technologies] >> VB Script >> Help with script to create an Event Page: [1]
Login
Message << Older Topic   Newer Topic >>
Help with script to create an Event - 8/5/2008 9:46:16 AM   
symbian

 

Posts: 12
Score: 0
Joined: 1/30/2008
Status: offline
I am trying to create a custom even in my system log, the command eventcreate will not work for me as I want to make it a higher ID than 1000. Can anyone help
Post #: 1
RE: Help with script to create an Event - 8/8/2008 4:16:22 PM   
rbennett806


Posts: 821
Score: 13
Joined: 6/14/2006
Status: offline
Have you tried something like...

objWshShell.LogEvent 1, "Put your error message here."

to create the Event Viewer log entry? I'm not sure if that'll give you the results that you want or not....

(in reply to symbian)
Post #: 2
RE: Help with script to create an Event - 8/14/2008 11:27:34 AM   
dstein


Posts: 618
Score: 5
Joined: 3/12/2003
From: Virginia, USA
Status: offline
Unfortunately, LogEvent() won't accept anything but the standard types for the first argument (0,1,2,4,8,16).    symbian wants to write events with ID numbers higher than 1000.  EventCreate caps the ID limit at 1000 most likely to avoid conflicts and confusion with well-known Microsoft and partner events in the log.

< Message edited by dstein -- 8/14/2008 11:30:29 AM >


_____________________________

software is squishy-squashy, hardware is wishy-washy

(in reply to rbennett806)
Post #: 3
RE: Help with script to create an Event - 8/15/2008 3:11:00 PM   
rbennett806


Posts: 821
Score: 13
Joined: 6/14/2006
Status: offline
So why are you wanting to write to the Event Log? If it's to help ensure that things are running smoothly, can't you simply use a low number and put the program's error code in the body of the event message? Then sort for source WSH and look at the recorded errors...

(in reply to dstein)
Post #: 4
Page:   [1]
All Forums >> [Scripting Technologies] >> VB Script >> Help with script to create an Event Page: [1]
Jump to:





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts



  
Forum Software © ASPPlayground.NET Advanced Edition 2.4.5 ANSI

0.268