Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- options.Impersonation = ImpersonationLevel.Impersonate;
- options.Authentication = AuthenticationLevel.Default;
- options.Username = userName;
- options.Password = password;
- options.Authority = null;
- options.EnablePrivileges = true;
- ManagementScope scope = new ManagementScope(path, options);
- scope.Connect();
- // Create the process
- using (ManagementClass process = new ManagementClass("Win32_Process"))
- {
- ConnectionOptions conn = new ConnectionOptions();
- conn.Username = "support";
- conn.Password = "password";
- process.Scope = scope;
- process.InvokeMethod("Create", commandLine);
- ManagementScope ms = new ManagementScope(@"\10.64.4.38rootcimv2", conn);
- Process g = Process.Start(@"C:\Program FilesRealVNCVNC Viewervncviewer.exe");
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement