Skip to content

Commit 9d6b837

Browse files
authored
Add files via upload
1 parent 1b5299a commit 9d6b837

File tree

4 files changed

+145
-35
lines changed

4 files changed

+145
-35
lines changed

#Readme.txt

Lines changed: 44 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,33 @@
11

2-
[ Englishize Cmd v1.2 ]
2+
[ Englishize Cmd v1.3 ]
33

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

66
[ What? ]
77

8-
# Change non-English CMD interface to English in Windows 7/Vista
8+
. Toggles between English and non-English for most Windows commands.
9+
10+
. For English system admins who manages Windows PCs of other languages.
11+
12+
. No need to log off; settings are appled immediately.
13+
14+
. Comes with a restorer too. Apply or restore is as simple as a click.
15+
16+
. Better character compatibility than changing DOS codepage.
17+
18+
. Most languages and executables are supported. Customizable.
19+
20+
. Administrator rights are required. It asks for rights to elevates itself.
21+
Does not elevate over network mapped drives however.
922

10-
# For the full story, read the article:
11-
http://wandersick.blogspot.com/p/change-non-english-command-line.html
23+
. Windows Vista/7 or later only.
1224

13-
[ How-to ]
25+
[ Instructions ]
1426

1527
1. "Englishize.bat" for changing command line tools from non-English to
16-
English. (Requires admin rights)
28+
English.
1729

18-
2. "Restore.bat" to restore everything back to original language. (Requires
19-
admin rights)
30+
2. "Restore.bat" to restore everything back to original language.
2031

2132
3. "_lang_codes.txt" is a modifiable list containing all non-English language
2233
codes. It includes most languages but in case your language is not there,
@@ -26,18 +37,32 @@
2637
executables that will be affected in the change. All commands in Windows
2738
Vista and 7 should be covered (although it contains much more commands
2839
than there actually are, it doesn't matter because it has no effect on
29-
commands that don't exist.) If you decide some commands are better left
30-
localized rather than being changed to English, remove them from this list
31-
before running "Englishize.bat". Also, although the list covers command-
32-
line executables, you can add GUI -- Graphical User Interface - programs
33-
such as Paint - mspaint.exe and lots of others to "_files_to_process.txt".
34-
There is a limitation here though. Windows comes with both English and
35-
non-English .mui files for command-line programs only; by default .mui for
36-
GUI programs don't exist in en-US folder until users install the English
37-
MUI through Windows Update) or Vistalizator (for non-Ultimate/Enterprise
38-
Windows users).
40+
commands that don't exist.)
3941

42+
If you decide some commands are better left localized rather than being
43+
changed to English, remove them from the list before running "Englishize.
44+
bat".
45+
46+
Also, although the list covers command-line executables, you can add GUI
47+
-- Graphical User Interface - programs such as Paint - mspaint.exe and
48+
lots of others to "_files_to_process.txt". There is a limitation here
49+
though. Windows comes with both English and non-English .mui files for
50+
command-line programs only; by default .mui for GUI programs don't exist
51+
in en-US folder until users install the English MUI through Windows
52+
Update) or Vistalizator (for non-Ultimate/Enterprise Windows users).
53+
54+
[ Video Demo ]
55+
56+
http://wandersick.blogspot.com/p/change-non-english-command-line.html
57+
58+
[ Releases ]
59+
60+
v1.3 Now elevates automatically. Added check for Windows version.
61+
v1.2 Documentation and coding improvements
62+
v1.1 Added check for admin rights
63+
v1.0 First public release
64+
4065
[ Suggestions ]
4166

4267
# Do you have one? Please drop me a line by email or the web site atop.
43-
68+

Data/_elevate.vbs

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
' Subscript of Cmd Dict by wanderSick
2+
' See main script -- fy.cmd -- for more details.
3+
4+
' Used to run desired programs as administrator (for Vista or later with UAC)
5+
' Based on http://www.winhelponline.com/articles/185/1/VBScripts-and-UAC-elevation.html
6+
7+
Dim objShell, FSO
8+
Dim strFolder, strFile
9+
On Error Resume Next
10+
Set objShell = CreateObject("Shell.Application")
11+
Set FSO = CreateObject("Scripting.FileSystemObject")
12+
strWorkDir = WScript.Arguments(0)
13+
strFile = WScript.Arguments(1)
14+
strArg = "/c start " & chr(34) & chr(34) & " /d " & chr(34) & strWorkDir & chr(34) & " " & chr(34) & strFile & chr(34)
15+
'Debug line
16+
'Msgbox strWorkDir & strFile & vbcrlf & strArg
17+
If FSO.FileExists(strFolder & strFile) Then
18+
objShell.ShellExecute "cmd.exe", strArg, "", "runas", 1
19+
Else
20+
MsgBox "File " & strFile & " not found."
21+
End If

englishize.bat

Lines changed: 40 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,37 @@
11
@echo off
22

3+
:: detech win ver
4+
for /f "usebackq tokens=3 skip=2" %%i in (`reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion" /v CurrentVersion`) do (
5+
@if %%i LSS 6.0 (
6+
echo.
7+
echo # ERROR: Englishize Cmd only supports Windows Vista or later.
8+
echo.
9+
pause
10+
goto :EOF
11+
)
12+
)
13+
14+
:: detect if system has WSH disabled unsigned scripts
15+
:: if useWINSAFER = 1, the TrustPolicy below is ignored and use SRP for this option instead. So check if = 0.
16+
:: if TrustPolicy = 0, allow both signed and unsigned; if = 1, warn on unsigned; if = 2, disallow unsigned.
17+
for /f "usebackq tokens=3 skip=2" %%a in (`reg query "HKLM\SOFTWARE\Microsoft\Windows Script Host\Settings" /v UseWINSAFER 2^>nul`) do (
18+
@if "%%a" EQU "0" (
19+
@for /f "usebackq tokens=3 skip=2" %%i in (`reg query "HKLM\SOFTWARE\Microsoft\Windows Script Host\Settings" /v TrustPolicy 2^>nul`) do (
20+
@if "%%i" GEQ "2" (
21+
set noWSH=1
22+
)
23+
)
24+
)
25+
)
26+
27+
if defined noWSH (
28+
echo.
29+
echo # ERROR: Windows Scripting Host is disabled.
30+
echo.
31+
pause
32+
goto :EOF
33+
)
34+
335
:: detect if system supports "attrib"
436
attrib >nul 2>&1
537
if "%errorlevel%"=="9009" set noAttrib=1
@@ -8,22 +40,22 @@ if "%errorlevel%"=="9009" set noAttrib=1
840
if defined noAttrib goto :skipAdminCheck
941
attrib -h "%windir%\system32" | find /i "system32" >nul 2>&1
1042
if %errorlevel% EQU 0 (
11-
echo.
12-
echo :: ERROR: Admin rights required.
13-
echo.
14-
pause
43+
cscript //NoLogo ".\Data\_elevate.vbs" "%CD%\" "%CD%\englishize.bat" >nul 2>&1
44+
REM echo.
45+
REM echo # ERROR: Admin rights required.
46+
REM echo.
47+
REM pause
1548
goto :EOF
1649
)
1750
:skipAdminCheck
1851

1952
cls
2053

2154

22-
23-
title Englishize Cmd v1.1 - by wanderSick.blogspot.com
55+
title Englishize Cmd v1.3 - by wanderSick.blogspot.com
2456
echo.
2557
echo.
26-
echo [ Englishize Cmd v1.1 ]
58+
echo [ Englishize Cmd v1.3 ]
2759
echo.
2860
echo.
2961
echo # This script changes command line interface to English.
@@ -58,4 +90,4 @@ echo # Completed. To restore, run restore.bat
5890
echo.
5991
echo Press any key to run test . . .
6092
pause >nul
61-
start "" "%comspec%" /k "help&echo.&echo # Successful if the above is displayed in English&echo.&pause"
93+
start "" "%comspec%" /k "help&echo.&echo # Successful if the above is displayed in English.&echo.&pause"

restore.bat

Lines changed: 40 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,37 @@
11
@echo off
22

3+
:: detech win ver
4+
for /f "usebackq tokens=3 skip=2" %%i in (`reg query "HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion" /v CurrentVersion`) do (
5+
@if %%i LSS 6.0 (
6+
echo.
7+
echo # ERROR: Englishize Cmd only supports Windows Vista or later.
8+
echo.
9+
pause
10+
goto :EOF
11+
)
12+
)
13+
14+
:: detect if system has WSH disabled unsigned scripts
15+
:: if useWINSAFER = 1, the TrustPolicy below is ignored and use SRP for this option instead. So check if = 0.
16+
:: if TrustPolicy = 0, allow both signed and unsigned; if = 1, warn on unsigned; if = 2, disallow unsigned.
17+
for /f "usebackq tokens=3 skip=2" %%a in (`reg query "HKLM\SOFTWARE\Microsoft\Windows Script Host\Settings" /v UseWINSAFER 2^>nul`) do (
18+
@if "%%a" EQU "0" (
19+
@for /f "usebackq tokens=3 skip=2" %%i in (`reg query "HKLM\SOFTWARE\Microsoft\Windows Script Host\Settings" /v TrustPolicy 2^>nul`) do (
20+
@if "%%i" GEQ "2" (
21+
set noWSH=1
22+
)
23+
)
24+
)
25+
)
26+
27+
if defined noWSH (
28+
echo.
29+
echo # ERROR: Windows Scripting Host is disabled.
30+
echo.
31+
pause
32+
goto :EOF
33+
)
34+
335
:: detect if system supports "attrib"
436
attrib >nul 2>&1
537
if "%errorlevel%"=="9009" set noAttrib=1
@@ -8,20 +40,20 @@ if "%errorlevel%"=="9009" set noAttrib=1
840
if defined noAttrib goto :skipAdminCheck
941
attrib -h "%windir%\system32" | find /i "system32" >nul 2>&1
1042
if %errorlevel% EQU 0 (
11-
echo.
12-
echo :: ERROR: Admin rights required.
13-
echo.
14-
pause
43+
cscript //NoLogo ".\Data\_elevate.vbs" "%CD%\" "%CD%\restore.bat" >nul 2>&1
44+
REM echo.
45+
REM echo # ERROR: Admin rights required.
46+
REM echo.
47+
REM pause
1548
goto :EOF
1649
)
1750
:skipAdminCheck
1851

19-
2052
cls
21-
title Englishize Cmd v1.1 - by wanderSick.blogspot.com
53+
title Englishize Cmd v1.3 - by wanderSick.blogspot.com
2254
echo.
2355
echo.
24-
echo [ Englishize Cmd v1.1 ]
56+
echo [ Englishize Cmd v1.3 ]
2557
echo.
2658
echo.
2759
echo # This script restores the command line interface back to original
@@ -45,4 +77,4 @@ echo # Completed.
4577
echo.
4678
echo Press any key to run test . . .
4779
pause >nul
48-
start "" "%comspec%" /k "help&echo.&echo # Successful if the above is displayed in the original language&echo.&pause"
80+
start "" "%comspec%" /k "help&echo.&echo # Successful if the above is displayed in the original language.&echo.&echo # Note it may not reflect now if the restorer was run elevated.&echo.&pause"

0 commit comments

Comments
 (0)