From 2fa75e700f8ed0f709b8bdff87e153746d7366c2 Mon Sep 17 00:00:00 2001 From: Kohsuke Kawaguchi Date: Tue, 16 Nov 2010 18:46:15 -0800 Subject: [PATCH] not sure if this matters, but maybe this helps with AccessDenied problems? --- Wmi.cs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Wmi.cs b/Wmi.cs index 9122d3d..5117737 100755 --- a/Wmi.cs +++ b/Wmi.cs @@ -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;