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:
Try something like this:
Dim objShell
Set objShell = WScript.CreateObject ("WScript.shell")
objShell.run "cmd /c ver"
Set objShell = Nothing
EDIT:
Well then you can redirect output to a file and then read the file:
return = WshShell.Run("cmd /c ver > c:\temp\output.txt", 0, true)
Set fso = CreateObject("Scripting.FileSystemObject")
Set file = fso.OpenTextFile("c:\temp\output.txt", 1)
text = file.ReadAll
file.Close