本帖最后由 suchost 于 2015-10-27 21:59 编辑
回复 14# Batcher
手工导出,哈哈,一个有用的导出注册表代码:- @set @n=0;/* & echo off & setlocal enabledelayedexpansion
- md "reg" 2>nul
- pushd "reg\"
- (for %%a in (HKLM HKCU HKCR HKU HKCC) do (
- set "n="
- for /f "delims=" %%b in ('reg query "%%a" /s /f "txt" /k') do (
- set /a n+=1
- reg export "%%b" %%a_!n!.reg
- )
- )) 2>nul
- dir /b *.reg | cscript -nologo -e:jscript "%~0"
- start "" ".\"
- pause & exit/b & rem */
-
- fso = new ActiveXObject("Scripting.FileSystemObject");
- while (!WScript.StdIn.AtEndOfstream) {
- file = WScript.StdIn.ReadLine();
- f = fso.OpenTextFile(file, 1, false, -1);
- txt= f.Readall();
- f.Close();
- txt= /[\s\S]*?^\[[\s\S]*?(?=^\[)/m.exec(txt + "\r\n[")[0];
- fso.OpenTextFile(file, 2, true, -1).write(txt);
- }
复制代码 注意改txt |