i'm a beginner of vbscript , i need you help , my question is how do i do to get a variable from cmd and show it in vbscript for example get a ping from www.google.com and show it in a msgbox in vbscript help me code :
dim cmd,x
set cmd = createobject("wscript.shell")
x= cmd.run("cmd /k ping www.google.com ",1,true)
Get that output and show it in a msgbox later , help me
Here an example of how to do that. The response of the ping that is checked is in Dutch but that doesn't matter for your case.
An advise though, don't begin scripting in vbscript, it's a dead end. Choose some modern scripting language like Python or still better for beginners: Ruby.
Be sure to use cscript as engine in stead of wscript, execute the following to set that as default.
Your vbscript is then one single line