You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
17 lines
494 B
17 lines
494 B
4 years ago
|
set fs = CreateObject("Scripting.FileSystemObject")
|
||
|
set sh = CreateObject("WScript.Shell")
|
||
|
|
||
|
|
||
|
function exec(cmd)
|
||
|
sh.Run "cmd /c "+cmd+" >%temp%\res.stt",0
|
||
|
do while not fs.FileExists(sh.ExpandEnvironmentStrings("%temp%")+"\res.stt")
|
||
|
WScript.Sleep 500
|
||
|
loop
|
||
|
set f = fs.OpenTextFile(sh.ExpandEnvironmentStrings("%temp%")+"\res.stt", 1, false)
|
||
|
exec = f.readall
|
||
|
f.Close()
|
||
|
set f = nothing
|
||
|
fs.DeleteFile(sh.ExpandEnvironmentStrings("%temp%")+"\res.stt"), True
|
||
|
end function
|
||
|
|
||
|
msgbox exec("help")
|