Home > Back-end >  Set the command line window encoding UTF8
Set the command line window encoding UTF8

Time:03-10

CHCP 65001 change the encoding UTF8 after
Use the start command to start the process of mysoftware. Exe, the window of the process of coding is still GBK, how do I change the encoding of the process window to UTF8


The batch file below
@ echo off
CHCP 65001 & gt; Nul 2 & gt; & 1
Nul 2 & gt; & 1 "% SYSTEMROOT % \ system32 \ cacls exe" "% SYSTEMROOT % \ system32 \ config \ system", "
If '% % errorlevel NEQ' 0 '(
Goto UACPrompt
) else (goto gotAdmin)
: UACPrompt
Echo the Set UAC=CreateObject ^ (" Shell. Application "^) & gt; "% temp % \ getadmin. VBS"
Echo UAC. ShellExecute "% ~ s0", ""," ", "runas", 1 & gt;> "% temp % \ getadmin. VBS"
"% temp % \ getadmin. VBS"
The exit/B
: gotAdmin
If exist "% temp % \ getadmin VBS" (del "% temp % \ getadmin. VBS")

% 1 mshta vbscript: CreateObject (" WScript. Shell "). The Run (" % ~ s0: : ", 0, FALSE) (window. Close) & amp; & The exit

CD/d % ~ dp0
CD..
Echo % % CD
Start "mysoftware"/min/D % \ % CD "AAA", "% % \ CD AAA \ mysoftware exe"

CodePudding user response:

Remove the start
  • Related