I´m trying to learn the concept of writing events to Windows Event Log using Manifest and I followed the documentation provided by Microsoft.
I´ll describe the steps I took and where it went wrong. Hopefully someone can tell me whats missing or what I'm doing wrong.
Created a Instrumentation Manifest using
ECManGen.exe
proving information about the provider (C++ Console application), e.g. path to .exe-file. Created channels for all the type (Debug, Administration, Operational, and Analytic). Finally created an event that I later wanted to write to log. (Also created Tasks and Keywords to organize the Event).Created a new project in Visual Studio 2013 (C++ Console Application) and included the Manifest (.man) file.
Changed the build settings for the Manifest file to Custom build tool and set command line to
mc -v -h . "%(FullPath)"
and output to%(Filename).rc;%(Filename).h;
.I then built the project with no problems generating the .rc-file, .h-file, and .bin-files.
After the build I included the all the files to the project generated in Step 4 and rebuild. The rebuild generated the .res-file out of the .rc-file and the resource tab looks like this:
Project -Manifest.rc
-11The last step was to register the provider with wevtutil im Manifest.man and this is where I get the error. I received the following error:
Warning: Publisher GGSProvider resources are not accessible.
Failed to open metadata for publisher GGSEventManifest.man. The system cannot find the file specified.
Does anyone see what is wrong or can provide a simple step-by-step guide?
Thanks for any contribution!