not sure if this matters, but maybe this helps with AccessDenied problems?

pull/1/head
Kohsuke Kawaguchi 2010-11-16 18:46:15 -08:00
parent 30fb009f66
commit 2fa75e700f
1 changed files with 3 additions and 0 deletions

3
Wmi.cs
View File

@ -93,6 +93,9 @@ namespace WMI
public WmiRoot(string machineName)
{
ConnectionOptions options = new ConnectionOptions();
options.EnablePrivileges = true;
options.Impersonation = ImpersonationLevel.Impersonate;
options.Authentication = AuthenticationLevel.PacketPrivacy;
string path;