『楼 主』:
关于GhRegEdt
使用 LLM 解释/回答一下
为什么照着网上的资料操作GhRegEdt
没有一个会成功的。。
XPSP2 系统 MAXDOS 5.7 全NTFS格式
想在DOS导入注册表
GhRegEdt -cp=936 import 1.1:\a.reg
GhRegEdt import 1.1:\a.reg
GhRegEdt import 1.1:\windows a.reg
都不成功,提示line2错误什么的,或者什么键值没找到。在windows下用GhRegEdit32 却可以导入
想在DOS删除注册表,这个也是照着网上的资料弄的 用GhRegEdt不成功
以下是资料
引言:首先要说明一个问题,就是为什么不在windows下直接编辑注册表,而要拐弯抹角到DOS下去处理?这里举个例大家就明白了,HKEY_LOCAL_MACHINE\SYSTEM\WPA这个键下的值,能编辑吗?这里微软记录了你的系统曾经用过的序列号,当然不允许你随便更改,也就无法抹除自己的盗版史;还有那个流氓中文上网官方游,在发现低版本的第三方软件试图删除它时,也会锁定注册表让你无法清理它。好在有DOS这样优秀的系统,There is no locked file in the Disk Operation System.经过一个下午的折腾,终于把这款在DOS下完美处理注册数据的软件GhRegEdt搞明白了。下面就把我使用这款软件的心得体会跟大家分享交流。
提问:我的系统是NTFS格式的,在DOS下能处理注册表吗?
回答:NTFS格式分区已经出来差不多8年了,现在新出来的DOS软件基本上都支持NTFS格式分区的数据处理了,我介绍的这款软件GhRegEdt当然支持在NTFS格式分区的系统。
提问:它是哪里来的?
回答:它来自于Symantec Ghost Solution Suite 2.0
提问:它能处理64位Windows系统吗?
回答:在DOS下无法编辑处理64位Windows系统的注册表
提问:如何使用?
回答:直接输入GhRegEdt,就会出现帮助信息,但是有那么一点晦涩难懂,所以这里我会对注册表的每种操作都举实例,这样就方便大家依葫芦画瓢了。
1、定位需要处理哪个windows系统的注册表(只有一个windows系统的可以略过此条)。
输入:
代码:
GhRegEdt Windows就会列举出它识别到你硬盘的所有windows系统,例如1.1:\windows表明第一个硬盘的第一个分区,由于我的分区都是NTFS格式的,所以在DOS下就不会显示为C盘。如果你的windows系统安装在第二个硬盘的第一个分区,当然定位就是2.1:\windows,如果你对你的硬盘分区结构很了解,不需要运行这个命令也能自己推算出windows系统的定位。如果在运行命令时没有加入windows定位参数,它就对默认的windows系统进行注册表操作,当然,最前的硬盘的最前的分区上的系统就是默认的。
2、最简单的注册表操作,当然就是增删注册表项(Addkey/Delkey)
1)增加注册表项(Addkey)
例如我们要在HKEY_LOCAL_MACHINE\SOFTWARE这项里面加一个项test,那么应该执行命令:
代码:
GhRegEdt addkey 1.1:\windows HKEY_LOCAL_MACHINE\SOFTWARE\test由于第一个硬盘的第一个分区上的Windows系统必然是默认系统,所以1.1:\windows这个系统定位是可以省略的,那么命令可以简写成
代码:
GhRegEdt addkey HKEY_LOCAL_MACHINE\SOFTWARE\test2)删除注册表项(Delkey)
删除刚才建立的test项
代码:
GhRegEdt delkey HKEY_LOCAL_MACHINE\SOFTWARE\test是不是很简单啊?!
3、增删注册表键值(Addvalue/Delvalue)
注册表值的类型有五种,包括:
i)字符串值(REG_SZ);
ii)二进制值(REG_BINARY);
iii)DWORD 值(REG_DWORD);
iv)多字符串值(REG_MULTI_SZ);
v)可扩充字符串值(REG_EXPAND_SZ)
GhRegEdt能支持所有windows里有的注册表值!
例如我们要在刚才那个添加的注册表项里增加一个字符串值a b c d,并且将其值设为1234,就可以执行如下命令:
代码:
GhRegEdt addvalue HKEY_LOCAL_MACHINE\SOFTWARE\test "a b c d" REG_SZ 1234这里可以看到我加了引号,因为字符串值里有空格,在DOS下操作,空格意味着参数的改变,所以必须加入引号以防止DOS误判,那么我要加入一个字符串值a,并将其值设为1234,就可以不加引号,命令如下:
代码:
GhRegEdt addvalue HKEY_LOCAL_MACHINE\SOFTWARE\test a REG_SZ 1234如果不指定字符串值,则是修改默认字符串值。
删除它就很简单啦!把addvalue换成delvalue就OK!
什么?你问我更改键值用什么参数!很简单啦,直接以创建的形式就OK,会覆盖原值的,不用专门的参数!
增删多字符串值要稍稍复杂一些,也举例说明,例如我们要在test键下增加多字符串值a b c d,并将其值设为1和2和3和My Dear,那么应该执行如下命令:
代码:
GhRegEdt addvalue HKEY_LOCAL_MACHINE\SOFTWARE\test "a b c d" REG_MULTI_SZ :: "1"::"2"::"3"::"My Dear"::都坚持看到这里了,想必也会删除此值了,的确简单,不累述!
4、查看注册表(enumkey/enumvalue)
1)展开子键(enumkey)
非常不推荐在DOS下查看,因为子键往往很多,在DOS下要翻屏,看不到前面的了,如果实在要看,建议加入|more(前提是你的DOS系统有这个外部命令)来停屏滚!
举例,要查看HKEY_LOCAL_MACHINE\SOFTWARE的子键
代码:
GhRegEdt enumkey HKEY_LOCAL_MACHINE\SOFTWARE|more2)查看某键的值(enumvalue)
举例,要查看开头我们建立的test键的值
代码:
GhRegEdt enumvalue HKEY_LOCAL_MACHINE\SOFTWARE\test5、导入导出注册表(export/import)
这个主要用于注册表的备份与恢复,特别提醒的是,GhRegEdt默认只支持英文,如果要想它支持中文,必须加入中国地区代码,也就是加入参数-cp=936!
中文windows系统的注册表,必然含有中文,所以在导入导出时,就要加入上述参数,在添加键值时,如果有中文,也必须加入上述参数!
1)导出注册表
举例,导出HKEY_LOCAL_MACHINE\SOFTWARE\test到第一个硬盘第一个分区根目录成注册表文件a.reg
代码:
GhRegEdt -cp=936 export 1.1:\a.reg HKEY_LOCAL_MACHINE\SOFTWARE\test2)导入注册表
把刚才导出的注册表文件重新导入,这个就简单了,不用在命令行加入路径
代码:
GhRegEdt -cp=936 import 1.1:\a.reg
Why is there no success when following the information from the internet to operate GhRegEdt??
XPSP2 system MAXDOS 5.7, all NTFS format
Want to import the registry in DOS
GhRegEdt -cp=936 import 1.1:\a.reg
GhRegEdt import 1.1:\a.reg
GhRegEdt import 1.1:\windows a.reg
None of them succeed, and it prompts errors like line 2 or that some key value is not found. In Windows, using GhRegEdit32 can import it successfully
Want to delete the registry in DOS, this is also following the information from the internet, but GhRegEdt doesn't work
The following is the information
Introduction: First of all, we need to explain a problem, that is, why not directly edit the registry under Windows, but go to DOS to handle it? Here is an example for everyone to understand. The value under the key HKEY_LOCAL_MACHINE\SYSTEM\WPA, can it be edited? Here Microsoft records the serial number that your system has used, of course it does not allow you to change it casually, so you can't erase your piracy history; and that rogue Chinese internet access official tour, when it finds that a low-version third-party software tries to delete it, it will also lock the registry so that you can't clean it up. Fortunately, there is such an excellent system as DOS. There is no locked file in the Disk Operation System. After a whole afternoon of tossing, I finally figured out this software GhRegEdt that perfectly handles registration data under DOS. Now I will share my experience in using this software with you.
Question: My system is in NTFS format. Can I handle the registry under DOS?
Answer: The NTFS format partition has been around for almost 8 years. Now the newly released DOS software basically supports the data processing of the NTFS format partition. This software GhRegEdt I introduced certainly supports the system in the NTFS format partition.
Question: Where does it come from?
Answer: It comes from Symantec Ghost Solution Suite 2.0
Question: Can it handle 64-bit Windows systems?
Answer: The registry of 64-bit Windows systems cannot be edited and processed under DOS
Question: How to use it?
Answer: Directly enter GhRegEdt, and the help information will appear, but it is a bit obscure, so here I will give examples for each operation of the registry, so that everyone can follow suit.
1. Locate which Windows system's registry needs to be processed (those with only one Windows system can skip this item).
Enter:
Code:
GhRegEdt Windows will list all the Windows systems it detects on your hard drive. For example, 1.1:\windows indicates the first partition of the first hard drive. Since my partitions are all NTFS format, it will not be displayed as drive C under DOS. If your Windows system is installed in the first partition of the second hard drive, of course the location is 2.1:\windows. If you are very familiar with your hard drive partition structure, you can also deduce the location of the Windows system without running this command. If the Windows location parameter is not added when running the command, it will perform registry operations on the default Windows system. Of course, the system on the frontmost partition of the frontmost hard drive is the default.
2. The simplest registry operation, of course, is to add and delete registry keys (Addkey/Delkey)
1) Add registry key (Addkey)
For example, we want to add an item test under HKEY_LOCAL_MACHINE\SOFTWARE, then we should execute the command:
Code:
GhRegEdt addkey 1.1:\windows HKEY_LOCAL_MACHINE\SOFTWARE\test Since the Windows system on the first partition of the first hard drive must be the default system, the system location of 1.1:\windows can be omitted, so the command can be simplified to
Code:
GhRegEdt addkey HKEY_LOCAL_MACHINE\SOFTWARE\test2) Delete registry key (Delkey)
Delete the just-established test item
Code:
GhRegEdt delkey HKEY_LOCAL_MACHINE\SOFTWARE\test Is it very simple?!
3. Add and delete registry key values (Addvalue/Delvalue)
There are five types of registry values, including:
i) String value (REG_SZ);
ii) Binary value (REG_BINARY);
iii) DWORD value (REG_DWORD);
iv) Multi-string value (REG_MULTI_SZ);
v) Expandable string value (REG_EXPAND_SZ)
GhRegEdt can support all registry values in Windows!
For example, we want to add a string value a b c d in the just-added registry item and set its value to 1234, then we can execute the following command:
Code:
GhRegEdt addvalue HKEY_LOCAL_MACHINE\SOFTWARE\test "a b c d" REG_SZ 1234 Here you can see that I added quotes because there are spaces in the string value. When operating under DOS, spaces mean a change in parameters, so quotes must be added to prevent DOS from misjudging. Then if I want to add a string value a and set its value to 1234, I can not add quotes, and the command is as follows:
Code:
GhRegEdt addvalue HKEY_LOCAL_MACHINE\SOFTWARE\test a REG_SZ 1234 If the string value is not specified, the default string value is modified.
Deleting it is very simple! Just change addvalue to delvalue!
What? You ask me what parameter to use to change the key value! It's very simple, just create it directly, and it will overwrite the original value, no special parameter is needed!
Adding and deleting multi-string values is a bit more complicated, and examples are given. For example, we want to add a multi-string value a b c d under the test key and set its value to 1 and 2 and 3 and My Dear, then the following command should be executed:
Code:
GhRegEdt addvalue HKEY_LOCAL_MACHINE\SOFTWARE\test "a b c d" REG_MULTI_SZ :: "1"::"2"::"3"::"My Dear":: You have persisted in reading here, and you should also be able to delete this value. It is indeed simple, and I won't repeat it!
4. View the registry (enumkey/enumvalue)
1) Expand subkeys (enumkey)
It is not recommended to view under DOS at all, because there are often many subkeys, and under DOS, you have to turn the page, and you can't see the previous ones. If you really want to see, it is recommended to add |more (provided that your DOS system has this external command) to stop the screen rolling!
For example, to view the subkeys of HKEY_LOCAL_MACHINE\SOFTWARE
Code:
GhRegEdt enumkey HKEY_LOCAL_MACHINE\SOFTWARE|more2) View the value of a key (enumvalue)
For example, to view the value of the just-established test key
Code:
GhRegEdt enumvalue HKEY_LOCAL_MACHINE\SOFTWARE\test5. Import and export the registry (export/import)
This is mainly used for backup and recovery of the registry. It is particularly reminded that GhRegEdt only supports English by default. If you want it to support Chinese, you must add the Chinese region code, that is, add the parameter -cp=936!
The registry of the Chinese Windows system must contain Chinese, so when importing and exporting, the above parameters must be added. When adding key values, if there are Chinese characters, the above parameters must also be added!
1) Export the registry
For example, export HKEY_LOCAL_MACHINE\SOFTWARE\test to the root directory of the first partition of the first hard drive as the registry file a.reg
Code:
GhRegEdt -cp=936 export 1.1:\a.reg HKEY_LOCAL_MACHINE\SOFTWARE\test2) Import the registry
It's simple to import the just-exported registry file again, no need to add the path in the command line
Code:
GhRegEdt -cp=936 import 1.1:\a.reg
|