中国DOS联盟论坛

China DOS Union

-- Unite DOS · Advance DOS · Grow DOS --
Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum
Guest | Log in | Register | Members | Search | China DOS Union
中国DOS联盟论坛
The time now is 2026-09-23 15:27
47,812 topics / 349,917 posts / today 0 new / 48,273 members
DOS批处理 & 脚本技术(批处理室) » Solved: Modify the registry in the command line or batch processing
Printable Version  1,799 / 7
Floor1 laodifang Posted 2005-12-09 14:10
初级用户 Posts 14 Credits 36
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 ]
Floor2 htysm Posted 2005-12-09 14:11
高级用户 Posts 415 Credits 866
sorry:Can't help you.
Floor3 220110 Posted 2005-12-09 15:21
荣誉版主 Posts 313 Credits 718
reg add HKEY_LOCAL_MACHINE\*\*\*
Floor4 laodifang Posted 2005-12-09 15:30
初级用户 Posts 14 Credits 36
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.
Floor5 laodifang Posted 2005-12-10 09:50
初级用户 Posts 14 Credits 36
Can the friend on the 3rd floor give some guidance?
Floor6 220110 Posted 2005-12-10 11:03
荣誉版主 Posts 313 Credits 718
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.
Floor7 laodifang Posted 2005-12-10 13:21
初级用户 Posts 14 Credits 36
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.
Floor8 jzhupo Posted 2005-12-10 21:10
中级用户 Posts 53 Credits 347
@echo off
echo REGEDIT4>1.reg
echo.>>1.reg
echo ……>>1.reg
regedit -s 1.reg
del 1.reg
[ Contact the Union admin team - 中国DOS联盟 - Standard version ]
Sponsored by ifanr Inc | © 2001–2023