Site icon Default Reasoning

Create your own custom events in the event log.

unhide recovery partition

Did you ever wonder how to add some custom events to your computer system or application log? I always have but never really had the time to look it up. I was browsing the Windows Server 2008 command reference guide at Microsoft TechNet Windows Server TechCenter and I found the EventCreate.exe command. So, let’s give it a try.

C:>EventCreate.exe /L Application /T Success /SO Script /ID 1 /D “The script completed successfully”

This command will create a success event with ID 1 from the source script in the Application log of your local machine and the description will be “The script completed successfully”.

Type EventCreate.exe /? at the command prompt for more options. You can even send events to remote computers! This is a great way to implement some error logging to your scripts. Tested on Windows XP, Vista and Server 2008.

Cheers! 🙂

– Marek.Z

Exit mobile version