How to create a wmi namespace programmatically

Topics: Logging Application Block
Mar 11, 2008 at 5:22 PM
Hi

I have written a .net assembly that can log events using wmi using the enterprise logging block. The assembly will be called by C++ applications (i.e. multiple applications). Each C++ application will need to log to a different WMI namespace (e.g. app1 will log to root\companyname\App1, and app2 will log to root\companyname\app2). I need to therefore be able to set the WMI namespace programmatically because the .net assembly wont know this information until the C++ application tells it. I will also need to create the namespaces using an installation program.

So, my questions are
1. How do I programmatically create namespaces?
2. How do I set the WMI namespace programmatically that Enterprise logging will use?

Thanks in advance.