I need execute a command line in a Visual Basic Script

Viewed 78416

I need to execute the command "ver" in my vbs to see the version of my Operating System, and i don't know how make it.

I tried this, but dont work:

Function ExecuteWithTerminalOutput(cmd)
Set shell = WScript.CreateObject("WScript.Shell")
Set Exec =  shell.Exec("ver")
End Function
3 Answers
Dim shell
Set shell= WScript.CreateObject ("WScript.shell")
shell.Exec"cmd /c ver"
Set shell= Nothing
Related