Bat File IP Monitoring

April 22, 2011 at 13:43:37
Specs: Windows Vista

I am trying to create a bat file that will monitor my ip address and subsequently run a program every time my ip address changes.

I'm using a VPN that's changing my ip every so often and I want a program or command to run every time it changes.

If anyone can give me a code that would work that would be greatly apreciated!!

Thank you

See More: Bat File IP Monitoring

Report •

May 29, 2011 at 14:48:54
I have a small solution you can do, i dont havea pc in front of me but i'll try to make this as simple as possible

@echo off
ipconfig > file1.txt
ipconfig > file2.txt
(cant remember the command but it is in the help thingy if you add help as a command. basically compare them)
if %tcf% = "" goto back
(here you run the command you want)
goto top

first it saves your ip, then saves it again, compares them, if nothing is different then compare again, if something is different then execute a command and do it all again

Report •
Related Solutions

Ask Question