![]() |
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-08-04 07:54 |
48,038 topics / 350,123 posts / today 0 new / 48,251 members |
| DOS学习入门 & 精彩文章 (教学室) » Playing with the Windows Registry in a DOS environment |
| Printable Version 2,101 / 2 |
| Floor1 Lydong | Posted 2002-10-25 00:00 |
| 元老会员 Posts 407 Credits 1,468 From 广州 | |
|
Playing with Windows Registry in DOS Environment
By/Red Maple Forest The Registry Editor can not only run and be used under Windows, but also run in MS-DOS real mode. Sometimes when the registry is damaged and Windows cannot be started, we have to repair or modify the registry in DOS mode. The actual physical files of the registry are System.dat and User.dat, that is to say, the data in the registry is saved in these two files. Exporting the Registry This command can realize the backup of the registry file. Command format: Regedit /L:system /R:user /E filename.reg Regpath Parameter meanings: /L: system specifies the path where the System.dat file is located. /R: user specifies the path where the User.dat file is located. /E: This parameter specifies that the Registry Editor is to perform the operation of exporting the registry. After this parameter, leave a space and enter the file name for exporting the registry. Regpath: used to specify which branch of the registry is to be exported. If not specified, all registry branches will be exported. If you intend to export all the branches under the HKEY_CLASSER_ROOT root key saved in C:\Windows\System.dat and saved in C:\Windows\Profiles\User.dat to file.reg, you can execute the following command: Regedit /L:C:\Windows\ /R:C:\Windows\Profiles\ /e file1.reg HKEY_CLASSER_ROOT Importing the Registry Command format: Regedit /L:system /R:user file.reg Parameter meanings: /L: system specifies the path where the System.dat file is located. /R: user specifies the path where the User.dat file is located. Rebuilding the Registry Rebuilding the registry means re-establishing the System.dat and User.dat files. Command format: Regedit /L:system /R:user /C file.reg Parameter meanings: /L: system specifies the path where the System.dat file is located. /R: user specifies the path where the User.dat file is located. /C: This parameter will tell the Registry Editor to re-establish the registry with the content in the specified.reg file. If you want to re-establish the entire registry with the content in the file.reg file and save it to C:\Windows\System.dat and C:\Windows\Profiles\User.dat, you can execute the command: Regedit /L:C:\Windows\ /R:C:\Windows\Profiles\ /C file1.reg Deleting Registry Branches This command can delete a subkey branch in the registry. The command format is: Regedit /L:system /R:user /D Regpath Parameter meanings: /L: system specifies the path where the System.dat file is located. /R: user specifies the path where the User.dat file is located. /C: This parameter tells the Registry Editor to delete the registry subkey branch specified by Regpath. Restoring the Registry Scanreg.exe can check, backup, restore, and repair the registry. This command is stored in the "Windows\Command" directory. Command format: Scanreg Parameter meanings: The /backup parameter is to backup the registry and related configuration files. These files are the four files System.dat, User.dat, Win.ini, and System.ini under the \windows directory respectively. Compress these files into a rb-?.cab file and store it in the \windows\sysbckup directory. Using this command multiple times will generate multiple CAB files, generally starting from 000. The system default maximum number of backups is 5. You can modify the maximum number of backups in the \Windows\scanreg.ini file by modifying the value of "maxbackupcopies=?". The /restore parameter is to select a backup to restore the registry. This command cannot be executed in the Windows 98 environment. It must be shut down and then restarted to enter the pure DOS mode to run. The /fix parameter is to repair the damaged registry. This command can also only be run in DOS mode. The /comment="" parameter is to add some detailed comments to the CAB file when backing up the registry. To restore the damaged registry file, you can use the Scanreg command to repair it. The method is: first enter the DOS system operating environment, and then execute the following command: Scanreg /Restore At this time, the system will prompt the registry backup situation, including the CAB file name and backup time, etc. The user can select the CAB file to be restored for recovery. If you want to view all backup files and the parts related to backup, you can execute the command: Scanreg /restore /comment If there is a problem with the registry, you can use Scanreg to repair it. The command is: Scanreg /fix. ——Extracted from: China Computer Education News |
|
| Floor2 醉公子 | Posted 2003-06-12 00:00 |
| 初级用户 Posts 57 Credits 333 | |
|
Can I back up the registry using DOS under Windows 2000?
|
|
| Floor3 iversonhe | Posted 2003-06-13 00:00 |
| 初级用户 Posts 6 Credits 132 | |
|
Where are the user.dat and system.dat in XP? I want to know the detailed path~
|
|
|
[ Contact the Union admin team -
中国DOS联盟 -
Standard version ] Sponsored by ifanr Inc | © 2001–2023 |