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-01 14:44
中国DOS联盟论坛 » DOS批处理 & 脚本技术(批处理室) » Solved: Modify the registry in the command line or batch processing View 1,721 Replies 7
Original Poster Posted 2005-12-09 14:10 ·  中国 浙江 温州 平阳县 电信
初级用户
Credits 36
Posts 14
Joined 2005-12-09 12:12
20-year member
UID 46777
Gender Male
Status Offline
I wrote a registry entry, and it works perfectly when imported directly, but I want to complete this task through a batch script. How should I write it?

[ Last edited by willsort on 2005-12-29 at 14:58 ]
Floor 2 Posted 2005-12-09 14:11 ·  中国 安徽 芜湖 电信
高级用户
★★★
Credits 866
Posts 415
Joined 2005-12-04 11:19
20-year member
UID 46459
Status Offline
sorry:Can't help you.
Floor 3 Posted 2005-12-09 15:21 ·  中国 广东 广州 白云区 电信
荣誉版主
★★★
Credits 718
Posts 313
Joined 2005-09-26 00:00
20-year member
UID 42844
Gender Male
Status Offline
reg add HKEY_LOCAL_MACHINE\*\*\*
Floor 4 Posted 2005-12-09 15:30 ·  中国 浙江 温州 平阳县 电信
初级用户
Credits 36
Posts 14
Joined 2005-12-09 12:12
20-year member
UID 46777
Gender Male
Status Offline
I feel that the format of the upstairs is not very correct. I remember that first edit a registry file in a certain partition, then run this file, and then delete it.
Floor 5 Posted 2005-12-10 09:50 ·  中国 浙江 温州 平阳县 电信
初级用户
Credits 36
Posts 14
Joined 2005-12-09 12:12
20-year member
UID 46777
Gender Male
Status Offline
Can the friend on the 3rd floor give some guidance?
Floor 6 Posted 2005-12-10 11:03 ·  中国 广东 广州 白云区 电信
荣誉版主
★★★
Credits 718
Posts 313
Joined 2005-09-26 00:00
20-year member
UID 42844
Gender Male
Status Offline
Originally posted by laodifang at 2005-12-9 15:30:
It feels that the format of the upstairs is not very correct. I remember that first edit a registry file in a certain partition, then run this file, and then delete it.


Try this:
Create a.txt file, for example, enter the following:
REGEDIT
HKEY_CLASSES_ROOT\ABCDEF =abcdef

Save it, change the suffix to.reg, and run it to merge into the registry, and you will see that there is a sub-item ABCDEF under HKEY_CLASSES_ROOT.
Floor 7 Posted 2005-12-10 13:21 ·  中国 浙江 温州 电信
初级用户
Credits 36
Posts 14
Joined 2005-12-09 12:12
20-year member
UID 46777
Gender Male
Status Offline
What I want is not to directly create registry entries and import them, but to write a batch script because I'm not using it on just one computer.
Floor 8 Posted 2005-12-10 21:10 ·  中国 天津 教育网
中级用户
★★
Credits 347
Posts 53
Joined 2004-07-04 00:00
22-year member
UID 27798
Gender Male
Status Offline
@echo off
echo REGEDIT4>1.reg
echo.>>1.reg
echo ……>>1.reg
regedit -s 1.reg
del 1.reg
Forum Jump: