reset isp dynamic ip address using an access vba code

fernando50
fernando50 used Ask the Experts™
on
I need to reset 3 or 4 times per  day ,the dynamic ip the isp assigns to me.I  need to do it by a vba script in a access program. I am hooked to a dsl modem directly by a network cable .

  Note I do not need to change my computer ip (i already have a script to do that).
 I just need to get a diferent IP from the isp before an access 2003 form trigers an event

Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Top Expert 2006
Commented:
What if you ran the commands

ipconfig /renew

in a command prompt, did that work for you? if so or if not, use the commands you currently use

then in access, it uses vba, not vbscript. So in vba you can do

Shell "cmd /c ipconfig/renew"
Dave BaldwinFixer of Problems
Most Valuable Expert 2014
Commented:
@rockiroads, that renews the local computer IP address... it will normally reassign the same one.  In order to reset the external IP address used to get from the Internet to the DSL modem, you have to get the DSL modem to request a 'release' and 'renew'.  Note that once again, that does not 'guarantee' that you will get a different IP address.
Top Expert 2006

Commented:
yes your right, it is a two step process. forgot to add that, thanks for that spot.
Introduction to R

R is considered the predominant language for data scientist and statisticians. Learn how to use R for your own data science projects.

Author

Commented:
DaveBaldwin, how do I get the DSL modem to request a 'release' and 'renew' ? how can I do it in vba ?
how do i test if my dynamic IP has changed ?
Dave BaldwinFixer of Problems
Most Valuable Expert 2014

Commented:
I don't know if it can be done in vba.  You will need to get the technical details for your DSL modem and see if it can programmed to do it from your computer thru the network.  For certain your vba will not run on the modem.  To see if your external IP address has changed, you will have to connect to a service on the internet that will report it.  Do you have web hosting where you can put an ASP or PHP file that will tell you?

Whatever reason you have for changing your external IP address, your ISP will know what you are doing.

Author

Commented:
Please I need more help on I geting the DSL modem to request a 'release' and 'renew' by vba code.
When I switch off and then on the modem the dynamic ip is changing ,I just need to do it by code
Dave BaldwinFixer of Problems
Most Valuable Expert 2014

Commented:
You will have to get the specs and info for your DSL modem and see if it is possible.  There isn't any generic way to do that.
Top Expert 2006
Commented:
I was looking at netsh http://technet.microsoft.com/en-us/library/bb490943.aspx and wonder if you can try this

so instructions here http://hubpages.com/hub/Change-Dynamic-IP tried to do with via command line

and this looks like it http://www.windowsitpro.com/article/resource-kit/cool-things-to-do-with-netsh.aspx


Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial