Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum
DOS stands for freedom, openness and progress. Let us work hard, learn from the openness and GNU spirit of FreeDOS and Linux, and together build and grow a free GNU GPL world!
Credits 2,000 Posts 621 Joined 2007-01-01 00:00 19-year member UID 75212 Gender Male
Status Offline
Now under Vista; running shows that the MS-DOS version does not match;
By the way
ren %WinDir%\System32\config.nt %WinDir%\System32\config.nt.bak
Because this syntax is wrong:
So all the machines that have run this batch processing have their config.nt all overwritten; and there is no backup of config.nt.bak;
This sentence should be changed to:
ren %WinDir%\System32\config.nt config.nt.bak
Just took a look, the content of config.nt in the original XP SP2 (excluding comments) is:
dos=high, umb
device=%SystemRoot%\system32\himem.sys
files=40
Credits 21 Posts 6 Joined 2007-02-05 07:36 19-year member UID 78675 Gender Male
Status Offline
Not quite understand
DEVICE=%WinDir%\System32\ANSI.SYS /x
Why doesn't it use the same output method as other statements?
Why not use the %SystemRoot% variable instead of %WinDir%?
Moreover, if there is already a config.nt.bak, ren will cause an error when still renaming
But we can't see it
So it is suggested to restore before exiting
Credits 609 Posts 374 Joined 2006-08-02 22:38 19-year member UID 59720
Status Offline
Haha, I modified the post of est. Keep the main part.
@echo off
chcp 437>nul
graftabl 936>nul
if not exist CONFIG.NT copy %WinDir%\System32\CONFIG.NT CONFIG.NT
@cls
echo DEVICE=%WinDir%\System32\ANSI.SYS /x >%WinDir%\System32\CONFIG.NT
command /cecho
command /cecho [1;31mWe are going to[32m change colors[33m, [35mdo you want to[36m change or not[37m!
pause>nul
copy CONFIG.NT %WinDir%\System32\CONFIG.NT
del CONFIG.NT
exit
Credits 7,493 Posts 2,672 Joined 2005-09-02 00:00 20-year member UID 42173 Gender Male
Status Offline
Posting images, posting images
@echo off & setlocal enableextensions enabledelayedexpansion
cls
set cecho_=command /cecho
for /l %%i in (0,1,7) do (
for /l %%j in (2,1,9) do (
set /a k=%%j-2
%cecho_%
[ Last edited by electronixtar on 2007-5-6 at 06:34 PM ]