forked from sgumhold/cgv
-
Notifications
You must be signed in to change notification settings - Fork 0
/
define_charset.bat
39 lines (38 loc) · 1022 Bytes
/
define_charset.bat
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
@echo off
setlocal EnableDelayedExpansion
%~d0
cd %~p0
echo Define Character Set used for cgv Framework
echo -------------------------------------------
echo please answer the following question by
echo entering a number between 1 and 2 and
echo pressing return afterwards.
echo -------------------------------------------
echo choose system platform:
echo.
echo interactive mode:
echo [1] ... Unicode
echo [2] ... MultiByte
echo.
echo [q] ... quit script
echo.
:ask_again
set /P selection=choose 1-2 or q^>
if [%selection%] == [] (
echo please enter a number between 1 and 2 or q for quit
goto:ask_again
)
if "%selection%" == "q" (
echo script canceled
pause
goto:eof
)
set cgvcharset=Unicode
if "%selection%" == "2" (
call set cgvcharset=MultiByte
)
call reg ADD HKEY_CURRENT_USER\Environment /v CGV_CHARSET /t REG_SZ /d "%cgvcharset%" /f > nul 2> nul
bin\setx CGV_DUMMY ""
call reg DELETE HKEY_CURRENT_USER\Environment /v CGV_DUMMY /f >nul 2> nul
echo set CGV_CHARSET to %cgvcharset%
pause