Skip to content

Commit 27dc6af

Browse files
committed
Improve speed of SetNetworkPermissions exe
1 parent 14b650f commit 27dc6af

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

SetNetworkPermissions/Program.cs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -387,10 +387,10 @@ private static void SetAcl(string uri, string userName)
387387
}
388388

389389
// Remove the URL ACL if it exists
390-
SendNetshCommand(netshCommand);
390+
//SendNetshCommand(netshCommand);
391391
TL.BlankLine();
392392

393-
netshCommand = "";
393+
//netshCommand = "";
394394
foreach (IPAddress ipAddress in HostPc.IpV6Addresses)
395395
{
396396
TL.LogMessage("SetAcl", $"Found IP Network Address: {ipAddress}");
@@ -401,10 +401,10 @@ private static void SetAcl(string uri, string userName)
401401
}
402402

403403
// Remove the URL ACL if it exists
404-
SendNetshCommand(netshCommand);
404+
//SendNetshCommand(netshCommand);
405405
TL.BlankLine();
406406

407-
netshCommand = "";
407+
//netshCommand = "";
408408
// Remove localhost entry if present
409409
string localHostCommand = $@"http delete urlacl url=http://127.0.0.1:{portAndUri}" + "\r\n";
410410
TL.LogMessage("SetAcl", $"Sending UrlAcl Delete command to NetSh: {localHostCommand}");
@@ -423,6 +423,7 @@ private static void SetAcl(string uri, string userName)
423423
// Now send the new UrlAcl
424424
TL.LogMessage("SetAcl", $"Sending new UrlAcl command to NetSh: {command}");
425425
netshCommand += command + "\r\n";
426+
TL.LogMessage("SetAcl", $"NetSh command length: {netshCommand.Length} NetSh Command: {netshCommand}");
426427
SendNetshCommand(netshCommand);
427428

428429
}

0 commit comments

Comments
 (0)