|
本帖最后由 pznpt 于 2013-4-17 21:50 编辑
咋不早说有那么大呢?
1.需要第三方工具:http://www.bathome.net/thread-16975-1-1.html- @echo off
- reg export "HKLM\MYREG" "%temp%\$$"
- reg delete "HKLM\MYREG" /f
- type "%temp%\$$"|sed "s/[Cc]:\\/X:\\/g" > "%temp%\$$.reg"
- reg import "%temp%\$$.reg"
- del "%temp%\$$.*"
- pause
复制代码 2.自己先导出注册表为back.reg,删除原注册表"HKLM\MYREG",运行下面的vbs,再手工将生成的abc.reg导入- Set fso = CreateObject("Scripting.FileSystemObject")
- text = fso.OpenTextFile("back.reg",1,True,-1).ReadAll
- With New RegExp
- .Pattern = "c:\"
- .Global = True
- .IgnoreCase = True
- text = .Replace(text,"X:")
- End With
- fso.OpenTextFile("abc.reg",2,True,-1).Write text
- MsgBox "OK"
复制代码 |
|