wasSharpNET
/Platform/Windows/Commands/NetSH/URLACL.cs |
@@ -12,19 +12,17 @@ |
{ |
public class URLACL |
{ |
private string domain; |
private string URL; |
public string domain; |
public string URL; |
|
private readonly Regex URLReservationRegex; |
private string username; |
private int timeout; |
public string username; |
|
public URLACL(string URL, string username, string domain, int timeout) |
public URLACL(string URL, string username, string domain) |
{ |
this.URL = URL; |
this.username = username; |
this.domain = domain; |
this.timeout = timeout; |
|
URLReservationRegex = |
new Regex( |
@@ -58,7 +56,7 @@ |
|
checkProcess.Start(); |
checkProcess.BeginOutputReadLine(); |
checkProcess.WaitForExit(60000); |
checkProcess.WaitForExit(); |
|
return URLReservationRegex.IsMatch(netSHOutput.ToString()); |
} |
@@ -72,8 +70,8 @@ |
Verb = @"runas", |
CreateNoWindow = true, |
WindowStyle = ProcessWindowStyle.Hidden, |
UseShellExecute = false |
}).WaitForExit(timeout); |
UseShellExecute = true |
}).WaitForExit(); |
} |
|
public void Release() |
@@ -84,8 +82,8 @@ |
Verb = @"runas", |
CreateNoWindow = true, |
WindowStyle = ProcessWindowStyle.Hidden, |
UseShellExecute = false |
}).WaitForExit(timeout); |
UseShellExecute = true |
}).WaitForExit(); |
} |
} |
} |