|
本帖最后由 pznpt 于 2013-5-9 09:26 编辑
在HKEY_LOCAL_MACHINE\SOFTWARE\ACD Systems中,提取数据包含字串C:\的项,是这个意思吗?
bat试了一下,findstr不争气,提示错误"xx行太长"。整一个vbs试一下- Set fso = CreateObject("Scripting.FileSystemObject")
- Set ws = CreateObject("WScript.Shell")
- Tmp = ws.ExpandEnvironmentStrings("%temp%")
- ws.Run "cmd /creg export ""HKLM\SOFTWARE\ACD Systems"" """&Tmp&"\$$.reg""",0,True
- Set file = fso.OpenTextFile(Tmp & "\$$.reg",1,,-1)
- Do Until file.AtEndOfStream
- a = file.ReadLine
- If UCase(Left(a,20)) = "[HKEY_LOCAL_MACHINE" Then b = Mid(a,2,Len(a)-2)
- If InStr(UCase(a),"C:") <> 0 Then
- If InStr(UCase(str),UCase(b)&vbCrLf) = 0 Then
- str = str & b & vbCrLf
- End If
- End If
- Loop
- file.Close : Set file = Nothing
- fso.CreateTextFile("Result.txt",True).Write str
- fso.DeleteFile Tmp & "\$$.reg"
- MsgBox "OK"
复制代码 WinXP的reg export 没有 /y开关,改一下 |
评分
-
查看全部评分
|