wasSharpNET
/Platform/Windows/Utilities.cs |
@@ -40,13 +40,5 @@ |
|
return true; |
} |
|
public static bool isWindows() |
{ |
return Environment.OSVersion.Platform.Equals(PlatformID.Win32NT) || |
Environment.OSVersion.Platform.Equals(PlatformID.Win32S) || |
Environment.OSVersion.Platform.Equals(PlatformID.Win32Windows) || |
Environment.OSVersion.Platform.Equals(PlatformID.WinCE); |
} |
} |
} |
/Platform/Windows/Commands/NetSH/URLACL.cs |
@@ -14,11 +14,11 @@ |
public class URLACL |
{ |
private readonly string domain; |
private readonly int timeout; |
private readonly string URL; |
|
private readonly Regex URLReservationRegex; |
private readonly string username; |
private readonly int timeout; |
|
public URLACL(string URL, string username, string domain, int timeout) |
{ |
@@ -53,7 +53,9 @@ |
checkProcess.OutputDataReceived += (sender, output) => |
{ |
if (output?.Data != null) |
{ |
netSHOutput.Append(output.Data); |
} |
}; |
|
checkProcess.Start(); |
@@ -82,7 +84,9 @@ |
{ |
// User cancelled the UAC elevation prompt. |
if (ex.NativeErrorCode == 1223) |
{ |
return false; |
} |
} |
|
if (process == null) |
@@ -109,7 +113,9 @@ |
{ |
// User cancelled the UAC elevation prompt. |
if (ex.NativeErrorCode == 1223) |
{ |
return false; |
} |
} |
|
if (process == null) |
@@ -118,4 +124,4 @@ |
return process.WaitForExit(timeout); |
} |
} |
} |
} |