Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
wandersick authored Oct 23, 2017
1 parent 2f37920 commit aea037d
Show file tree
Hide file tree
Showing 5 changed files with 47 additions and 13 deletions.
9 changes: 7 additions & 2 deletions #Readme.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

[ Englishize Cmd v1.5 ]
[ Englishize Cmd v1.6a ]

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

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

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

[ Instructions ]

Expand Down Expand Up @@ -57,6 +57,11 @@

[ Releases ]

v1.6a A quick fix to improve the last version.
v1.6 Fixed bug in some non-English localized versions of Windows
where 'Administrators' group account is named something else.
Thanks Markus (echalone).
Confirmed working in Windows 8.1.
v1.5 Support for mui files under %systemroot%\syswow64.
Restorer now restores original permissions and ownership
Confirmed working in Windows 8. Updated with new CLI tools.
Expand Down
16 changes: 16 additions & 0 deletions Data/_determine_admin_group_name.vbs
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
' For more info, see below web page:
' http://blogs.technet.com/b/heyscriptingguy/archive/2005/11/02/how-can-i-determine-the-name-of-the-local-administrators-group.aspx

Dim strComputer, objWMIService, colAccounts, objAccount
On Error Resume Next

strComputer = "."

Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")

Set colAccounts = objWMIService.ExecQuery _
("Select * From Win32_Group Where LocalAccount = TRUE And SID = 'S-1-5-32-544'")

For Each objAccount in colAccounts
Wscript.Echo objAccount.Name
Next
14 changes: 9 additions & 5 deletions englishize.bat
Original file line number Diff line number Diff line change
Expand Up @@ -49,18 +49,22 @@ if %errorlevel% EQU 0 (
)
:skipAdminCheck

:: acquire admin group account name

for /f "usebackq tokens=* delims=" %%i in (`cscript //NoLogo ".\Data\_determine_admin_group_name.vbs"`) do set adminGroupName=%%i

cls


title Englishize Cmd v1.5
title Englishize Cmd v1.6a
echo.
echo.
echo [ Englishize Cmd v1.5 ]
echo [ Englishize Cmd v1.6a ]
echo.
echo.
echo # This script changes command line interface to English.
echo.
echo # Designed for localized non-English Windows 7/Vista. All languages supported.
echo # Designed for localized non-English Windows Vista or above. Any languages.
echo.
echo # Note 1. A few programs without a .mui aren't affected, e.g. xcopy
echo.
Expand All @@ -84,7 +88,7 @@ for /f "usebackq" %%i in ("_files_to_process.txt") do (
@for /f "usebackq" %%m in ("_lang_codes.txt") do (
@if exist "%systemroot%\SysWoW64\%%m\%%i.mui" (
takeown /a /f "%systemroot%\SysWoW64\%%m\%%i.mui"
cacls "%systemroot%\SysWoW64\%%m\%%i.mui" /E /G administrators:F
cacls "%systemroot%\SysWoW64\%%m\%%i.mui" /E /G "%adminGroupName%":F
ren "%systemroot%\SysWoW64\%%m\%%i.mui" "%%i.mui.disabled"
)
)
Expand All @@ -99,7 +103,7 @@ for /f "usebackq" %%i in ("_files_to_process.txt") do (
@for /f "usebackq" %%m in ("_lang_codes.txt") do (
@if exist "%systemroot%\System32\%%m\%%i.mui" (
takeown /a /f "%systemroot%\System32\%%m\%%i.mui"
cacls "%systemroot%\System32\%%m\%%i.mui" /E /G administrators:F
cacls "%systemroot%\System32\%%m\%%i.mui" /E /G "%adminGroupName%":F
ren "%systemroot%\System32\%%m\%%i.mui" "%%i.mui.disabled"
)
)
Expand Down
17 changes: 11 additions & 6 deletions restore.bat
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,16 @@ if %errorlevel% EQU 0 (
)
:skipAdminCheck

:: acquire admin group account name

for /f "usebackq tokens=* delims=" %%i in (`cscript //NoLogo ".\Data\_determine_admin_group_name.vbs"`) do set adminGroupName=%%i


cls
title Englishize Cmd v1.5
title Englishize Cmd v1.6a
echo.
echo.
echo [ Englishize Cmd v1.5 ]
echo [ Englishize Cmd v1.6a ]
echo.
echo.
echo # This script restores the command line interface back to original
Expand All @@ -73,16 +78,16 @@ for /f "usebackq" %%i in ("_files_to_process.txt") do (
icacls "%systemroot%\System32\%%m\%%i.mui" /setowner "NT Service\TrustedInstaller" /C
REM the below output is probably an error, hence muted to avoid confusion as redirection probably handled it
if exist "%systemroot%\SysWoW64\%%m\%%i.mui" @icacls "%systemroot%\SysWoW64\%%m\%%i.mui" /setowner "NT Service\TrustedInstaller" /C >nul 2>&1
icacls "%systemroot%\System32\%%m\%%i.mui" /grant:r Administrators:^(RX^) /inheritance:d
if exist "%systemroot%\SysWoW64\%%m\%%i.mui" @icacls "%systemroot%\SysWoW64\%%m\%%i.mui" /grant:r Administrators:^(RX^) /inheritance:d >nul 2>&1
icacls "%systemroot%\System32\%%m\%%i.mui" /grant:r "%adminGroupName%":^(RX^) /inheritance:d
if exist "%systemroot%\SysWoW64\%%m\%%i.mui" @icacls "%systemroot%\SysWoW64\%%m\%%i.mui" /grant:r "%adminGroupName%":^(RX^) /inheritance:d >nul 2>&1
)
if exist "%systemroot%\SysWoW64\%%m\%%i.mui.disabled" (
ren "%systemroot%\SysWoW64\%%m\%%i.mui.disabled" "%%i.mui"
if exist "%systemroot%\System32\%%m\%%i.mui.disabled" @ren "%systemroot%\System32\%%m\%%i.mui.disabled" "%%i.mui"
icacls "%systemroot%\SysWoW64\%%m\%%i.mui" /setowner "NT Service\TrustedInstaller" /C
if exist "%systemroot%\System32\%%m\%%i.mui" @icacls "%systemroot%\System32\%%m\%%i.mui" /setowner "NT Service\TrustedInstaller" /C >nul 2>&1
icacls "%systemroot%\SysWoW64\%%m\%%i.mui" /grant:r Administrators:^(RX^) /inheritance:d
if exist "%systemroot%\System32\%%m\%%i.mui" @icacls "%systemroot%\System32\%%m\%%i.mui" /grant:r Administrators:^(RX^) /inheritance:d >nul 2>&1
icacls "%systemroot%\SysWoW64\%%m\%%i.mui" /grant:r "%adminGroupName%":^(RX^) /inheritance:d
if exist "%systemroot%\System32\%%m\%%i.mui" @icacls "%systemroot%\System32\%%m\%%i.mui" /grant:r "%adminGroupName%":^(RX^) /inheritance:d >nul 2>&1
)
)
)
Expand Down
4 changes: 4 additions & 0 deletions test.bat
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
@echo off
for /f "usebackq tokens=* delims=" %%i in (`cscript //NoLogo ".\Data\_determine_admin_group_name.vbs"`) do set lala=%%i
echo lala = "%lala%"
pause

0 comments on commit aea037d

Please sign in to comment.