Welcome to HBH! If you have tried to register and didn't get a verification email, please using the following link to resend the verification email.

visual basic and batch


rockbll4's Avatar
[TheN00bHacker]
0 0

is there a way to run a btach file in visual basic? like uhh make it ping a website to get its ip and display it on a label?


ghost's Avatar
0 0

Is there something I'm missing? Why do you need to write a batch in visual basic that does that? Seems that a simple batch for cmd prompt would work just as well unless you just absolutely need a GUI for it.


rockbll4's Avatar
[TheN00bHacker]
0 0

well is there a way to display a websites ip address in visual basic w/o using batch?


Uber0n's Avatar
Member
0 0

I would advise you to PM c4p_sl0ck and ask him what to do ;)


ghost's Avatar
0 0

The most obvious way I come to think of is to create a batch file from VB. Just write it to *.bat and make the batch-file write the result to a text-file. Then use the Shell command to execute it. Now you have a text-file containing the IP. Open it with Visual Basic and read the IP. There you have it. PM me if you're still stuck.


ghost's Avatar
0 0

private sub form_load() shell("ping" + ("target.ip.here" ) + "-n 1" + "pause" ) end sub

or

private sub form_load() shell("ping" + "target.ip.here" + "-n 1" + "pause" ) end sub

something like this,should do it. the cmd screen,should say the t arget's IP adress. pm me if it doesn't work.my vb's getting rusty :p

peace.