J.Leo J.Leo - 1 year ago 56
Vb.net Question

redirecting > in .run isn't working in vb

I'm new to vb and I have this issue that when I want to use .run in vb, the redirect > isn't creating a new text file.

Dim shl = CreateObject("WScript.Shell")
shl.Run("ping -n 2 -w 1000 > C:\Users\JoshuaCh\Desktop\out.txt", 0, True)

Oh and I don't want to use .exec because I don't want to have pop-ups


Okay nvm I solved it.. seems like I have to add something in before the ping

shl.Run("%comspec% /c ping...")