-
a few days ago I asked how to run a dos command in VB
I got this answer but it won't work
cmd = "cmd /c dir > " & app.path & "\dosresult.txt"
so I run
Shell "ping 192.0.0.1 /c dir > c:\test.txt"
or
Shell "NSLOOKUP /c dir > c:\test.txt"
and it doesn't do anything
-
Hi,
It's the outputting to a file it doesn't like.
Create a batchfile that runs the command and shell to this.
Then you can access the output file.
Regards
Chris
-
Sorry,
I don't know what a batch file is!
Please Advice
-
Batch file is just a file with the ".BAT"
put this in a file
ping 192.0.0.1 /c dir > c:\test.txt
and call the file test.bat
then run shell "c:\test.bat" from VB
-
Got IT
Thanks a Billion!!!
-
Another question
How Can I do a multiple command like
nslookup
set type=mx
yahoo.com