vbs 好像可以这样:- with CreateObject("Adodb.Stream")
- .Type = 1
- .Mode = 3
- .Open
- .LoadFromFile "sys.config"
- bin = .Read(-1)
- End with
-
- For i = 1 to LenB(bin)
- b = MidB(bin, i, 1)
- If AscB(b) <> 0 Then s = s & Chr(AscB(b))
- Next
-
- Set re = New RegExp
- re.Pattern = "LoadPerfMICROSOFT(\d+)"
- If re.Test(s) Then var = re.Execute(s)(0).SubMatches(0)
-
- MsgBox var
复制代码
|