Long time no come to the forum to play, haha~~
Save the code as test.cmd under 2000/XP/2003/Vista and try double-clicking to run it~~
Save the code as test.cmd under 2000/XP/2003/Vista and try double-clicking to run it~~
@echo off
chcp 437>nul&&graftabl 936>nul
ren %WinDir%\System32\config.nt config.nt.bak 2>nul
<"%~f0" more +6 >%WinDir%\System32\config.nt
command /cecho
Reference posts:
1. (Closed) Who knows how to control the color of the string displayed by echo
2. Reprint: Use of ANSI.SYS program
Recommended website:
ASCII Art Software
Recommended software:
Yet Another Ansi Editor Download
---------------------The legendary divider line-----------------------
Included in TSCMD by Timo Salmi, heh
http://groups.google.com/group/alt.msdos.batch.nt/browse_frm/thread/6199e8abcd0c71db
Attachment: The version written by Timo Salmi: Perfectly backed up config.nt.
@echo off&&setlocal enableextensions
::
:: The paths
set ConfigNT=%WinDir%\System32\config.nt
set ConfigNTbak=%WinDir%\System32\config.nt.bak
::
:: Check that you have a backup or your original CONGIF.NT
if not exist "%ConfigNTbak%" (
echo.
echo Exiting %~f0
echo "%ConfigNTbak%"
echo File not found. Needed for restoring config.nt so first run
echo copy "%ConfigNT%" "%ConfigNTbak%"
goto :EOF
)
::
:: Use a copy of the backup as a double safety
copy "%ConfigNTbak%" "%temp%\CONFIG.NT">nul
::
:: Customize CONFIG.NT to use ANSI.SYS
> "%ConfigNT%" echo DOSONLY
>>"%ConfigNT%" echo dos=high, umb
>>"%ConfigNT%" echo device=%%SystemRoot%%\system32\himem.sys
>>"%ConfigNT%" echo files=40
>>"%ConfigNT%" echo DEVICE=%WinDir%\System32\ANSI.SYS /x
::
:: Choose the MS-DOS color
command /cecho
[ Last edited by electronixtar on 2007-5-6 at 01:16 AM ]
Recent Ratings for This Post
( 7 in total)
Click for details
C:\>BLOG http://initiative.yo2.cn/
C:\>hh.exe ntcmds.chm::/ntcmds.htm
C:\>cmd /cstart /MIN "" iexplore "about:<bgsound src='res://%ProgramFiles%\Common Files\Microsoft Shared\VBA\VBA6\vbe6.dll/10/5432'>"

