Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Write to the event log in Server 2000

Posted on 2008-06-16
3
Medium Priority
?
226 Views
Last Modified: 2013-12-05
Does anyone know if there is a way to write a customized event to the system or application event log in server 2000?  

On XP /Server 2003 it can be done with the Eventcreate command, but that command doesn't work on 2000
0
Comment
Question by:ITApprendista
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 9

Expert Comment

by:gregcmcse
ID: 21796661
I'm not sure what language you're writing in, but check out this page:
http://www.microsoft.com/technet/scriptcenter/guide/sas_log_akqy.mspx?mfr=true

Basically, for VBScript (can be modified for VB too):

Set WSH = Wscript.CreateObject("Wscript.Shell")
WSH.LogEvent 0, "Success doing what I wanted!"

I think you can create the "Wscript.Shell" object in any MS Visual language or in javascript also.

I don't have 2000 anywhere anymore, so I can't test this code... it doesn't seem to work in XP but I'm now on a MUCH more recent version of the Windows Script Host language than what 2000 has.

Hope this helps!
0
 

Author Comment

by:ITApprendista
ID: 21796916
Yeah, I was planning on using vbscript.  The only problem with above method is that as far as I know you can never edit the source.  The source is always going to be WSH.  Otherwise though I might have to go that route.
0
 
LVL 9

Accepted Solution

by:
gregcmcse earned 2000 total points
ID: 21796975
Well... the other option is using WSH.Run to run an outside app and then call the Windows 2000 Resource Kit tool Logevent.exe.

http://support.microsoft.com/kb/315410

If you don't have a copy of the W2K ResKit, I can see if I can find you a spot to get it from.
0

Featured Post

How to Use the Help Bell

Need to boost the visibility of your question for solutions? Use the Experts Exchange Help Bell to confirm priority levels and contact subject-matter experts for question attention.  Check out this how-to article for more information.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Some time ago I faced the need to use a uniform folder structure that spanned across numerous sites of an enterprise to be used as a common repository for the Software packages of the Configuration Manager 2007 infrastructure. Because the procedu…
Issue: One Windows 2008 R2 64bit server on the network unable to connect to a buffalo Device (Linkstation) with firmware version 1.56. There are a total of four servers on the network this being one of them. Troubleshooting Steps: Connect via h…
This course is ideal for IT System Administrators working with VMware vSphere and its associated products in their company infrastructure. This course teaches you how to install and maintain this virtualization technology to store data, prevent vuln…
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…

721 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question