Code Monkey home page Code Monkey logo

customprovider's Introduction

Custom Event Provider

This repository contains an example manifest for creating a custom event provider for the windows event log. This provider was inspired by the Stack Overflow question How to store an object in the Windows Event Log?

Most of the content for this manifest came from an article by Daniel Gordon In fact, the steps come directly from his article. I made modifications to his manifest file to represent the details of the Stack Overflow question.

How to Install

  1. Open a git bash prompt and cd to c



  2. Clone the repository and cd to cloned directory location.



  3. Open a Visual Studio Command Prompt and cd to C:\CustomProvider



  4. Compile the manifest: mc -css Namespace CustomProvider.man



  5. Create the resource file: rc CustomProvider.rc



  6. Compile the source: csc /target:library /unsafe /win32res:CustomProvider.res CustomProvider.cs


  7. Register the provider. wevtutil im CustomProvider.man



  8. You'll now see the custom provider in the Windows Event Viewer



  9. To write to the log, open a Windows Powershell prompt and execute New-WinEvent -ProviderName CustomProvider -Id 10000 -Payload @("MyValue1") then refresh the event log and you'll see the event.





  10. Congratulations, you've created a custom provider thanks to this repository and Daniel Gordon

How to Uninstall

  1. Open a Visual Studio Command Prompt and cd to C:\CustomProvider



  2. Unregister the provider. wevtutil um CustomProvider.man



  3. Open new event viewer window and provider will be removed.



customprovider's People

Contributors

ggcooper avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.