Skip to content

Commit cf0d2e7

Browse files
committed
Localization fixes
1 parent c13d7a0 commit cf0d2e7

File tree

2 files changed

+7
-18
lines changed

2 files changed

+7
-18
lines changed

installer/ServiceControl.aip

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -376,8 +376,8 @@
376376
<ROW Condition="VersionNT" Description="[ProductName] cannot be installed on [WindowsType9XDisplay]" DescriptionLocId="AI.LaunchCondition.No9X" IsPredefined="true" Builds="DefaultBuild"/>
377377
</COMPONENT>
378378
<COMPONENT cid="caphyon.advinst.msicomp.MsiLockPermComponent">
379-
<ROW LockObject="ServiceControl_Dir" Table="CreateFolder" User="Users" Permission="1610809791"/>
380-
<ROW LockObject="ServiceControl_Dir" Table="CreateFolder" User="Administrators" Permission="1880096767"/>
379+
<ROW LockObject="ServiceControl_Dir" Table="CreateFolder" User="[GRP_USERS]" Permission="1610809791"/>
380+
<ROW LockObject="ServiceControl_Dir" Table="CreateFolder" User="[GRP_ADMINISTRATORS]" Permission="1880096767"/>
381381
<ROW LockObject="ServiceControl_Dir" Table="CreateFolder" User="System" Permission="1880096767"/>
382382
</COMPONENT>
383383
<COMPONENT cid="caphyon.advinst.msicomp.MsiRegLocatorComponent">

src/ServiceControl/Infrastructure/Installers/UrlAclInstaller.cs

Lines changed: 5 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,7 @@ public class UrlAclInstaller : INeedToInstallSomething<Windows>
1313
{
1414
public void Install(string identity)
1515
{
16-
// Ignore identity and set URL ACL to 'Builtin\Users'
17-
18-
// Builtin account names can be localized: e.g. the Everyone Group is Jeder in German so Tranlate from SID
16+
// Ignore identity and set URL ACL to localized 'Builtin\Users'
1917
var accountSid = new SecurityIdentifier(WellKnownSidType.BuiltinUsersSid, null);
2018
identity = accountSid.Translate(typeof(NTAccount)).Value;
2119

@@ -33,7 +31,6 @@ public void Install(string identity)
3331
httpcfg set urlacl /u {{http://URL:PORT/[PATH/] | https://URL:PORT/[PATH/]}} /a D:(A;;GX;;;""{0}"")", identity);
3432
return;
3533
}
36-
3734
StartNetshProcess(identity, Settings.ApiUrl);
3835
}
3936

@@ -54,29 +51,24 @@ static void StartNetshProcess(string identity, string uri, bool deleteExisting =
5451
if (ExecuteNetshCommand(startInfo, out error))
5552
{
5653
Logger.InfoFormat("Granted user '{0}' HttpListener permissions for {1}.", identity, uri);
57-
5854
return;
5955
}
6056

61-
if (deleteExisting && error.Contains("Error: 183"))
57+
if (deleteExisting && error.Contains(": 183"))
6258
{
6359
startInfo = GetProcessStartInfo(identity, uri, true);
64-
65-
Logger.Info(
66-
string.Format(
67-
@"Failed to grant to grant user '{0}' HttpListener permissions. The error message from running the above command is: {1} Will try to delete the existing urlacl",
68-
identity, error));
60+
Logger.Info(string.Format(@"Failed to grant to grant user '{0}' HttpListener permissions. The error message from running the above command is: {1} Will try to delete the existing urlacl",identity, error));
6961

7062
if (ExecuteNetshCommand(startInfo, out error))
7163
{
72-
Logger.InfoFormat("Deleted user '{0}' HttpListener permissions for {1}.", identity, uri);
64+
Logger.InfoFormat("Deleted user HttpListener permissions for {0}.", uri);
7365
StartNetshProcess(identity, uri, false);
7466
return;
7567
}
7668
}
7769

7870
throw new Exception(string.Format(
79-
@"Failed to grant to grant user '{0}' HttpListener permissions.
71+
@"Failed to grant to grant user '{0}' HttpListener permissions.
8072
Try running the following command from an admin console:
8173
netsh http add urlacl url={2} user=""{0}""
8274
@@ -87,7 +79,6 @@ static void StartNetshProcess(string identity, string uri, bool deleteExisting =
8779
static bool ExecuteNetshCommand(ProcessStartInfo startInfo, out string error)
8880
{
8981
error = null;
90-
9182
using (var process = Process.Start(startInfo))
9283
{
9384
process.WaitForExit(5000);
@@ -96,9 +87,7 @@ static bool ExecuteNetshCommand(ProcessStartInfo startInfo, out string error)
9687
{
9788
return true;
9889
}
99-
10090
error = process.StandardOutput.ReadToEnd().Trim();
101-
10291
return false;
10392
}
10493
}

0 commit comments

Comments
 (0)