Addressing "Access Denied" Exception with WMI Calls
- by Joe
I'm getting an exception with a message of "Access Denied" when executing against a WMI request. Some WMI requests appear to require higher security privileges than others. Ultimately my goal is to monitor process launches within the system and log. Regardless if there is a better approach, its now become a vendetta in getting this WMI approach to work.
I've attempted the code at Security Tools - WMI Programming Using C#.Net and still receive the exception. If you copy the code found in the blog entry you can reproduce my issue.
Another post on a similar topic can be found at link text but again, try the code and you'll the see the same security exception.
How do I permit my code to execute these WMI requests?
I'm running on Windows 7 Pro and VS 2010 in a new C# command line project.