中国DOS联盟论坛

中国DOS联盟

-- 联合DOS 推动DOS 发展DOS --

联盟域名:www.cn-dos.net  论坛域名:www.cn-dos.net/forum
DOS,代表着自由开放与发展,我们努力起来,学习FreeDOS和Linux的自由开放与GNU精神,共同创造和发展美好的自由与GNU GPL世界吧!

游客:  注册 | 登录 | 命令行 | 会员 | 搜索 | 上传 | 帮助 »
中国DOS联盟论坛 » DOS批处理 & 脚本技术(批处理室) » 请教:用P知道注册表一个数据如何修改此数据的值
作者:
标题: 请教:用P知道注册表一个数据如何修改此数据的值 上一主题 | 下一主题
cjfcjf222
初级用户





积分 172
发帖 77
注册 2006-11-23
状态 离线
『楼 主』:  请教:用P知道注册表一个数据如何修改此数据的值

注册表式样是下面这样的
[HKEY_LOCAL_MACHINE\SYSTEM\MountedDevices]
"\\DosDevices\\Z:"=hex:e4,b0,28,3c,00,7e,00,00,00,00,00,00

值 \DosDevices\Z: 是不确定的,可能是 \DosDevices\H:  
数据e4,b0,28,3c,00,7e,00,00,00,00,00,00是固定的,如何删除或者修改\DosDevices\?:  为 \DosDevices\Z:

[ Last edited by cjfcjf222 on 2009-4-3 at 06:50 ]

2009-4-2 14:26
查看资料  发送邮件  发短消息 网志   编辑帖子  回复  引用回复
netbenton
银牌会员

批处理编程迷


积分 1916
发帖 752
注册 2008-12-28
来自 广西
状态 离线
『第 2 楼』:  

\DosDevices\Z:只是数据的名称,不是子键。
试试下面方法:

1把数据导出:
REG EXPORT HKEY_LOCAL_MACHINE\SYSTEM\MountedDevices  aaa.reg


2按需要修改后再导入:
REG IMPORT aaa.reg



精简
[你的+我的+他的]=>[大家的]    个人网志   
2009-4-3 01:05
查看资料  发送邮件  发短消息 网志  OICQ (37659560)  编辑帖子  回复  引用回复
cjfcjf222
初级用户





积分 172
发帖 77
注册 2006-11-23
状态 离线
『第 3 楼』:  

一楼上面的写错了

手工修改直接进入注册表就可以了,我想自动检测和修改
注册表式样是下面这样的
[HKEY_LOCAL_MACHINE\SYSTEM\MountedDevices]
"\\DosDevices\\Z:"=hex:e4,b0,28,3c,00,7e,00,00,00,00,00,00

值 \DosDevices\Z: 是不确定的,可能是 \DosDevices\H:  
数据e4,b0,28,3c,00,7e,00,00,00,00,00,00是固定的,如何删除或者修改\DosDevices\?:  为 \DosDevices\Z:

[ Last edited by cjfcjf222 on 2009-4-3 at 06:46 ]

2009-4-3 06:43
查看资料  发送邮件  发短消息 网志   编辑帖子  回复  引用回复
tireless
银牌会员





积分 2025
发帖 1122
注册 2007-9-5
状态 离线
『第 4 楼』:  


@echo off
for /f "skip=3 tokens=1,3" %%a in ('reg query HKLM\SYSTEM\MountedDevices /s') do (
  if /i "%%b"=="e4b0283c007e000000000000" (
    if /i "%%~pa"=="\DosDevices\" (
      reg delete HKLM\SYSTEM\MountedDevices /f /v %%a
    )
  )
)
[ Last edited by tireless on 2009-4-3 at 07:51 ]

   此帖被 +2 点积分     点击查看详情   
评分人:【 netbenton 分数: +2  时间:2009-4-3 08:03


2009-4-3 07:48
查看资料  发短消息 网志   编辑帖子  回复  引用回复
yishanju
银牌会员

[b]看你妹啊[/b]


积分 1488
发帖 1357
注册 2006-5-20
状态 离线
『第 5 楼』:  

看起来比较复杂:
我自己导出的注册表

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SYSTEM\MountedDevices]
"\\??\\Volume{e2f4e80e-8590-11dd-96ce-806d6172696f}"=hex:5c,00,3f,00,3f,00,5c,\
  00,49,00,44,00,45,00,23,00,43,00,64,00,52,00,6f,00,6d,00,53,00,41,00,4d,00,\
  53,00,55,00,4e,00,47,00,5f,00,43,00,44,00,2d,00,52,00,4f,00,4d,00,5f,00,53,\
  00,43,00,2d,00,31,00,34,00,38,00,43,00,5f,00,5f,00,5f,00,5f,00,5f,00,5f,00,\
  5f,00,5f,00,5f,00,5f,00,5f,00,5f,00,5f,00,5f,00,5f,00,5f,00,5f,00,5f,00,43,\
  00,49,00,30,00,39,00,5f,00,5f,00,5f,00,5f,00,23,00,35,00,26,00,63,00,39,00,\
  61,00,66,00,33,00,66,00,31,00,26,00,30,00,26,00,30,00,2e,00,30,00,2e,00,30,\
  00,23,00,7b,00,35,00,33,00,66,00,35,00,36,00,33,00,30,00,64,00,2d,00,62,00,\
  36,00,62,00,66,00,2d,00,31,00,31,00,64,00,30,00,2d,00,39,00,34,00,66,00,32,\
  00,2d,00,30,00,30,00,61,00,30,00,63,00,39,00,31,00,65,00,66,00,62,00,38,00,\
  62,00,7d,00
"\\??\\Volume{e2f4e80f-8590-11dd-96ce-806d6172696f}"=hex:e0,a2,4a,62,00,7e,00,\
  00,00,00,00,00
"\\??\\Volume{e2f4e810-8590-11dd-96ce-806d6172696f}"=hex:e0,a2,4a,62,00,30,4a,\
  02,02,00,00,00
"\\??\\Volume{e2f4e811-8590-11dd-96ce-806d6172696f}"=hex:e0,a2,4a,62,00,e0,86,\
  0f,08,00,00,00
"\\??\\Volume{e2f4e812-8590-11dd-96ce-806d6172696f}"=hex:e0,a2,4a,62,00,0e,46,\
  1c,0e,00,00,00
"\\DosDevices\\C:"=hex:e0,a2,4a,62,00,7e,00,00,00,00,00,00
"\\DosDevices\\D:"=hex:e0,a2,4a,62,00,30,4a,02,02,00,00,00
"\\DosDevices\\G:"=hex:5c,00,3f,00,3f,00,5c,00,49,00,44,00,45,00,23,00,43,00,\
  64,00,52,00,6f,00,6d,00,53,00,41,00,4d,00,53,00,55,00,4e,00,47,00,5f,00,43,\
  00,44,00,2d,00,52,00,4f,00,4d,00,5f,00,53,00,43,00,2d,00,31,00,34,00,38,00,\
  43,00,5f,00,5f,00,5f,00,5f,00,5f,00,5f,00,5f,00,5f,00,5f,00,5f,00,5f,00,5f,\
  00,5f,00,5f,00,5f,00,5f,00,5f,00,5f,00,43,00,49,00,30,00,39,00,5f,00,5f,00,\
  5f,00,5f,00,23,00,35,00,26,00,63,00,39,00,61,00,66,00,33,00,66,00,31,00,26,\
  00,30,00,26,00,30,00,2e,00,30,00,2e,00,30,00,23,00,7b,00,35,00,33,00,66,00,\
  35,00,36,00,33,00,30,00,64,00,2d,00,62,00,36,00,62,00,66,00,2d,00,31,00,31,\
  00,64,00,30,00,2d,00,39,00,34,00,66,00,32,00,2d,00,30,00,30,00,61,00,30,00,\
  63,00,39,00,31,00,65,00,66,00,62,00,38,00,62,00,7d,00
"\\DosDevices\\E:"=hex:e0,a2,4a,62,00,e0,86,0f,08,00,00,00
"\\DosDevices\\F:"=hex:e0,a2,4a,62,00,0e,46,1c,0e,00,00,00
"\\??\\Volume{b580ce98-be2d-11dd-ab8e-00e04cf3068f}"=hex:5c,00,3f,00,3f,00,5c,\
  00,53,00,54,00,4f,00,52,00,41,00,47,00,45,00,23,00,52,00,65,00,6d,00,6f,00,\
  76,00,61,00,62,00,6c,00,65,00,4d,00,65,00,64,00,69,00,61,00,23,00,37,00,26,\
  00,31,00,37,00,66,00,35,00,32,00,32,00,35,00,26,00,30,00,26,00,52,00,4d,00,\
  23,00,7b,00,35,00,33,00,66,00,35,00,36,00,33,00,30,00,64,00,2d,00,62,00,36,\
  00,62,00,66,00,2d,00,31,00,31,00,64,00,30,00,2d,00,39,00,34,00,66,00,32,00,\
  2d,00,30,00,30,00,61,00,30,00,63,00,39,00,31,00,65,00,66,00,62,00,38,00,62,\
  00,7d,00
"\\DosDevices\\H:"=hex:5c,00,3f,00,3f,00,5c,00,53,00,54,00,4f,00,52,00,41,00,\
  47,00,45,00,23,00,52,00,65,00,6d,00,6f,00,76,00,61,00,62,00,6c,00,65,00,4d,\
  00,65,00,64,00,69,00,61,00,23,00,37,00,26,00,31,00,37,00,66,00,35,00,32,00,\
  32,00,35,00,26,00,30,00,26,00,52,00,4d,00,23,00,7b,00,35,00,33,00,66,00,35,\
  00,36,00,33,00,30,00,64,00,2d,00,62,00,36,00,62,00,66,00,2d,00,31,00,31,00,\
  64,00,30,00,2d,00,39,00,34,00,66,00,32,00,2d,00,30,00,30,00,61,00,30,00,63,\
  00,39,00,31,00,65,00,66,00,62,00,38,00,62,00,7d,00




有问题请发论坛或者自行搜索,再短消息问我的统统是SB
2009-4-3 08:14
查看资料  发短消息 网志   编辑帖子  回复  引用回复
cjfcjf222
初级用户





积分 172
发帖 77
注册 2006-11-23
状态 离线
『第 6 楼』:  

谢谢,已经可以删除了

2009-4-3 12:35
查看资料  发送邮件  发短消息 网志   编辑帖子  回复  引用回复

请注意:您目前尚未注册或登录,请您注册登录以使用论坛的各项功能,例如发表和回复帖子等。


可打印版本 | 推荐给朋友 | 订阅主题 | 收藏主题



论坛跳转: