本帖最后由 老刘1号 于 2017-3-31 13:11 编辑
格式:bat,cmd,vbs,vbe随意- '&wscript -e:vbscript "%~0"
- Set oShell = CreateObject("WScript.Shell")
- Set oExec = oShell.Exec("systeminfo.exe")
- Do While Not oExec.StdOut.AtEndOfStream
- s = oExec.StdOut.ReadAll()
- Loop
- Const ForReading = 1, ForWriting = 2, ForAppending = 8
- Dim fso, f
- Set fso = CreateObject("Scripting.FileSystemObject")
- fso.CreateTextFile ".\systeminfo.txt",true,true
- Set f = fso.OpenTextFile(".\systeminfo.txt", ForWriting, True,-1)
- f.Write s
- f.Close
- oshell.run ".\systeminfo.txt"
复制代码
|