China DOS Union

-- Unite DOS · Advance DOS · Grow DOS --

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!

中国DOS联盟论坛
The time now is 2026-08-10 02:50
中国DOS联盟论坛 » DOS批处理 & 脚本技术(批处理室) » How to modify the Windows XP registry via batch processing under DOS? View 2,159 Replies 11
Original Poster Posted 2006-10-27 09:43 ·  中国 山东 烟台 联通
新手上路
Credits 10
Posts 4
Joined 2006-10-20 10:32
19-year member
UID 67245
Status Offline
My computer has both DOS and Windows XP systems coexisting. I want to write a batch file to run under DOS to modify the registry under XP. How to write it? I once tried to use the Regedit command, but under DOS, the Regedit command built-in under XP cannot run under DOS. Please help, great experts!
Floor 2 Posted 2006-10-27 10:11 ·  中国 湖北 武汉 电信
版主
★★★★★
Credits 11,386
Posts 4,938
Joined 2006-07-23 17:10
20-year member
UID 59080
Status Offline

Can't the regedit command be used under DOS?
Floor 3 Posted 2006-10-28 04:07 ·  中国 山东 烟台 联通
新手上路
Credits 10
Posts 4
Joined 2006-10-20 10:32
19-year member
UID 67245
Status Offline
The regedit command cannot be used!
I entered the C:\Windows directory, typed regedit, and it prompted that this command cannot run under DOS!
Floor 4 Posted 2006-10-28 04:51 ·  中国 湖北 武汉 电信
版主
★★★★★
Credits 11,386
Posts 4,938
Joined 2006-07-23 17:10
20-year member
UID 59080
Status Offline

Then you can only download third-party registry tools under DOS.
Floor 5 Posted 2006-10-28 12:49 ·  中国 四川 绵阳 电信
高级用户
★★
Credits 587
Posts 282
Joined 2006-04-10 03:40
20-year member
UID 53599
Gender Male
Status Offline
Modifying the registry of XP in real mode of DOS, it's not impossible, but it's just too unstable, right?
Floor 6 Posted 2006-10-28 23:15 ·  中国 四川 成都 电信
铂金会员
★★★★
Credits 7,493
Posts 2,672
Joined 2005-09-02 00:00
20-year member
UID 42173
Gender Male
Status Offline
I remember that it seems that Win98's built-in Regedit can modify the XP registry, and it supports regedit /c to rebuild.

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'>"
Floor 7 Posted 2007-04-02 08:20 ·  中国 湖北 武汉 电信
中级用户
★★
Credits 313
Posts 162
Joined 2007-04-02 06:45
19-year member
UID 83693
Gender Male
Status Offline
C:\af>reg /?

Windows Registry Editor Version 3.0
Copyright (C) Microsoft Corp. 1981-2001. All rights reserved.


REG Operation [parameter list]

Operation [ QUERY | ADD | DELETE | COPY |
SAVE | LOAD | UNLOAD | RESTORE |
COMPARE | EXPORT | IMPORT ]

Return codes: (except REG COMPARE)

0 - Success
1 - Failure

To get help on a specific operation, type:

REG Operation /?

For example:

REG QUERY /?
REG ADD /?
REG DELETE /?
REG COPY /?
REG SAVE /?
REG RESTORE /?
REG LOAD /?
REG UNLOAD /?
REG COMPARE /?
REG EXPORT /?
REG IMPORT /?
Floor 8 Posted 2007-04-21 01:23 ·  中国 湖北 潜江 电信
高级用户
★★★
Credits 894
Posts 411
Joined 2007-02-17 12:15
19-year member
UID 79697
Gender Male
Status Offline
ghregedt is okay, it seems not very easy to use, but better than nothing
@set c= 不知则觉多,知则觉少,越知越多,便觉越来越少. --- 知多少.
@for,/l,%%i,in,(1,1,55)do,@call,set/p=%%c:~%%i,1%%<nul&ping/n 1 127.1>nul


Floor 9 Posted 2007-04-21 01:48 ·  中国 新疆 乌鲁木齐 电信
高级用户
★★★
Autowalk
Credits 845
Posts 375
Joined 2007-03-03 01:58
19-year member
UID 80606
Gender Male
Status Offline
ECHO Put it like *.reg
Then run *.reg
pause

I don't know if this can work
Floor 10 Posted 2007-04-21 09:07 ·  中国 山东 淄博 联通
中级用户
★★
Credits 272
Posts 99
Joined 2006-06-02 09:12
20-year member
UID 56414
Status Offline
In pure DOS, there is no concept of the registry at all, and there is no specific registry file at all.

The system's regedit.exe is a 32-bit application, so naturally it cannot run in the 16-bit DOS environment.

The information contained in the registry is not a specific file.

Even if there is a specific file, the structure inside is not recognizable to us.

Under Windows, Microsoft provides special functions that allow us to operate the registry.

Many contents are directly loaded into memory.

Personally, I think that there is no possibility of operating the registry in pure DOS.

[ Last edited by my3439955 on 2007-4-21 at 10:07 PM ]
Floor 11 Posted 2007-04-21 13:44 ·  中国 北京 宽捷网通信技术有限公司
初级用户
Credits 84
Posts 28
Joined 2006-05-03 22:36
20-year member
UID 54894
Gender Male
Status Offline
Modifying the registry under DOS can only be achieved on Windows 98.

However, you can back up some relevant files in the c:\windows\system32\config\ directory and ntuser.* under %userprofile%. In case there is any problem with the system, you can use them to repair.
Floor 12 Posted 2008-10-13 09:04 ·  中国 河北 秦皇岛 电信
新手上路
Credits 4
Posts 2
Joined 2008-10-13 07:53
17-year member
UID 128222
Gender Male
Status Offline
Forum Jump: