public ProcessRemote(string userName, string password, string domain, string machineName) { this.userName = userName; this.password = password; this.domain = domain; this.machineName = machineName; options = ProcessConnection.ProcessConnectionOptions(); if (domain != null || userName != null) { options.Username = domain + "\\" + userName; options.Password = password; } connectionScope = ProcessConnection.ConnectionScope(machineName, options); }
public ProcessLocal() { options = ProcessConnection.ProcessConnectionOptions(); connectionScope = ProcessConnection.ConnectionScope( Environment.MachineName, options); }