My client want me to connect and disconnect from an internet connection automatically.
How can I do that? can we do that from batch files? Is there an API to do so>?
Printable View
My client want me to connect and disconnect from an internet connection automatically.
How can I do that? can we do that from batch files? Is there an API to do so>?
what type of connection?
modem, dsl.
However, I think I have figured out. It's just easier to use rasdial.
Rasdial /disconnect
rasdial "Connection Name"
Works perfectly
and then use shell to run the bat file.
The client want to get a new IP from his ISP every 5 minutes or so.
I wonder if there is also a shell command to make internet explorer use a certain IP settings.
Okay, I do
Shell "Rasdial """ + whatToPut("networkconnect") + """ /DISCONNECT"
Shell "Rasdial """ + whatToPut("networkconnect") + """"
The problem is if the 2 is too close together the first command hasn't finish disconnecting before the second command finish.
I turn that into a bat file but how can we execute bat file in vb6, especially if it's network drive?
I put waiting 2 seconds between the 2 command but I do not think it's an elegant solution. I want VB to automatically connect after disconnecting.
i may be mistaken, but i would believe rasdial is only for dial up connections, nothing to do with any wan/adsl connection