Skip to content

Commit aea037d

Browse files
authored
Add files via upload
1 parent 2f37920 commit aea037d

File tree

5 files changed

+47
-13
lines changed

5 files changed

+47
-13
lines changed

#Readme.txt

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11

2-
[ Englishize Cmd v1.5 ]
2+
[ Englishize Cmd v1.6a ]
33

44
http://wandersick.blogspot.com | wandersick@gmail.com
55

@@ -20,7 +20,7 @@
2020
. Administrator rights are required. It asks for rights to elevates itself.
2121
Does not elevate over network mapped drives however.
2222

23-
. Windows Vista or above only (Windows Vista/7/8, Server 2008/R2/8/2012)
23+
. Windows Vista or above only (Windows Vista/7/8/8.1, Server 2008/2012[R2])
2424

2525
[ Instructions ]
2626

@@ -57,6 +57,11 @@
5757

5858
[ Releases ]
5959

60+
v1.6a A quick fix to improve the last version.
61+
v1.6 Fixed bug in some non-English localized versions of Windows
62+
where 'Administrators' group account is named something else.
63+
Thanks Markus (echalone).
64+
Confirmed working in Windows 8.1.
6065
v1.5 Support for mui files under %systemroot%\syswow64.
6166
Restorer now restores original permissions and ownership
6267
Confirmed working in Windows 8. Updated with new CLI tools.

Data/_determine_admin_group_name.vbs

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
' For more info, see below web page:
2+
' http://blogs.technet.com/b/heyscriptingguy/archive/2005/11/02/how-can-i-determine-the-name-of-the-local-administrators-group.aspx
3+
4+
Dim strComputer, objWMIService, colAccounts, objAccount
5+
On Error Resume Next
6+
7+
strComputer = "."
8+
9+
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
10+
11+
Set colAccounts = objWMIService.ExecQuery _
12+
("Select * From Win32_Group Where LocalAccount = TRUE And SID = 'S-1-5-32-544'")
13+
14+
For Each objAccount in colAccounts
15+
Wscript.Echo objAccount.Name
16+
Next

englishize.bat

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -49,18 +49,22 @@ if %errorlevel% EQU 0 (
4949
)
5050
:skipAdminCheck
5151

52+
:: acquire admin group account name
53+
54+
for /f "usebackq tokens=* delims=" %%i in (`cscript //NoLogo ".\Data\_determine_admin_group_name.vbs"`) do set adminGroupName=%%i
55+
5256
cls
5357

5458

55-
title Englishize Cmd v1.5
59+
title Englishize Cmd v1.6a
5660
echo.
5761
echo.
58-
echo [ Englishize Cmd v1.5 ]
62+
echo [ Englishize Cmd v1.6a ]
5963
echo.
6064
echo.
6165
echo # This script changes command line interface to English.
6266
echo.
63-
echo # Designed for localized non-English Windows 7/Vista. All languages supported.
67+
echo # Designed for localized non-English Windows Vista or above. Any languages.
6468
echo.
6569
echo # Note 1. A few programs without a .mui aren't affected, e.g. xcopy
6670
echo.
@@ -84,7 +88,7 @@ for /f "usebackq" %%i in ("_files_to_process.txt") do (
8488
@for /f "usebackq" %%m in ("_lang_codes.txt") do (
8589
@if exist "%systemroot%\SysWoW64\%%m\%%i.mui" (
8690
takeown /a /f "%systemroot%\SysWoW64\%%m\%%i.mui"
87-
cacls "%systemroot%\SysWoW64\%%m\%%i.mui" /E /G administrators:F
91+
cacls "%systemroot%\SysWoW64\%%m\%%i.mui" /E /G "%adminGroupName%":F
8892
ren "%systemroot%\SysWoW64\%%m\%%i.mui" "%%i.mui.disabled"
8993
)
9094
)
@@ -99,7 +103,7 @@ for /f "usebackq" %%i in ("_files_to_process.txt") do (
99103
@for /f "usebackq" %%m in ("_lang_codes.txt") do (
100104
@if exist "%systemroot%\System32\%%m\%%i.mui" (
101105
takeown /a /f "%systemroot%\System32\%%m\%%i.mui"
102-
cacls "%systemroot%\System32\%%m\%%i.mui" /E /G administrators:F
106+
cacls "%systemroot%\System32\%%m\%%i.mui" /E /G "%adminGroupName%":F
103107
ren "%systemroot%\System32\%%m\%%i.mui" "%%i.mui.disabled"
104108
)
105109
)

restore.bat

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -49,11 +49,16 @@ if %errorlevel% EQU 0 (
4949
)
5050
:skipAdminCheck
5151

52+
:: acquire admin group account name
53+
54+
for /f "usebackq tokens=* delims=" %%i in (`cscript //NoLogo ".\Data\_determine_admin_group_name.vbs"`) do set adminGroupName=%%i
55+
56+
5257
cls
53-
title Englishize Cmd v1.5
58+
title Englishize Cmd v1.6a
5459
echo.
5560
echo.
56-
echo [ Englishize Cmd v1.5 ]
61+
echo [ Englishize Cmd v1.6a ]
5762
echo.
5863
echo.
5964
echo # This script restores the command line interface back to original
@@ -73,16 +78,16 @@ for /f "usebackq" %%i in ("_files_to_process.txt") do (
7378
icacls "%systemroot%\System32\%%m\%%i.mui" /setowner "NT Service\TrustedInstaller" /C
7479
REM the below output is probably an error, hence muted to avoid confusion as redirection probably handled it
7580
if exist "%systemroot%\SysWoW64\%%m\%%i.mui" @icacls "%systemroot%\SysWoW64\%%m\%%i.mui" /setowner "NT Service\TrustedInstaller" /C >nul 2>&1
76-
icacls "%systemroot%\System32\%%m\%%i.mui" /grant:r Administrators:^(RX^) /inheritance:d
77-
if exist "%systemroot%\SysWoW64\%%m\%%i.mui" @icacls "%systemroot%\SysWoW64\%%m\%%i.mui" /grant:r Administrators:^(RX^) /inheritance:d >nul 2>&1
81+
icacls "%systemroot%\System32\%%m\%%i.mui" /grant:r "%adminGroupName%":^(RX^) /inheritance:d
82+
if exist "%systemroot%\SysWoW64\%%m\%%i.mui" @icacls "%systemroot%\SysWoW64\%%m\%%i.mui" /grant:r "%adminGroupName%":^(RX^) /inheritance:d >nul 2>&1
7883
)
7984
if exist "%systemroot%\SysWoW64\%%m\%%i.mui.disabled" (
8085
ren "%systemroot%\SysWoW64\%%m\%%i.mui.disabled" "%%i.mui"
8186
if exist "%systemroot%\System32\%%m\%%i.mui.disabled" @ren "%systemroot%\System32\%%m\%%i.mui.disabled" "%%i.mui"
8287
icacls "%systemroot%\SysWoW64\%%m\%%i.mui" /setowner "NT Service\TrustedInstaller" /C
8388
if exist "%systemroot%\System32\%%m\%%i.mui" @icacls "%systemroot%\System32\%%m\%%i.mui" /setowner "NT Service\TrustedInstaller" /C >nul 2>&1
84-
icacls "%systemroot%\SysWoW64\%%m\%%i.mui" /grant:r Administrators:^(RX^) /inheritance:d
85-
if exist "%systemroot%\System32\%%m\%%i.mui" @icacls "%systemroot%\System32\%%m\%%i.mui" /grant:r Administrators:^(RX^) /inheritance:d >nul 2>&1
89+
icacls "%systemroot%\SysWoW64\%%m\%%i.mui" /grant:r "%adminGroupName%":^(RX^) /inheritance:d
90+
if exist "%systemroot%\System32\%%m\%%i.mui" @icacls "%systemroot%\System32\%%m\%%i.mui" /grant:r "%adminGroupName%":^(RX^) /inheritance:d >nul 2>&1
8691
)
8792
)
8893
)

test.bat

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
@echo off
2+
for /f "usebackq tokens=* delims=" %%i in (`cscript //NoLogo ".\Data\_determine_admin_group_name.vbs"`) do set lala=%%i
3+
echo lala = "%lala%"
4+
pause

0 commit comments

Comments
 (0)