February 9th, 2007, 12:17 PM
Script to Detect IP Address
The company I work for has a xp computer in another region that we use to monitor security cameras for the warehouse.
The problem is the IP address keeps changing and they do not want to purchase a static IP.
The script needs to detect the IP address and then email it to the admin over here daily.
February 9th, 2007, 01:04 PM
save the following line as a .bat file
ipconfig > c:\save_ip.txt
this will write a text file with the current IP address to the C drive...
set up a task scheduler to run the .bat file and then e-mail the text file to the remote e-mail address
another way to retrieve the data is to run the .bat file then use an FTP client to transfer the file to the other system.
Last edited by tj_nt; February 9th, 2007 at 01:10 PM.
February 9th, 2007, 02:01 PM
What if I wanted to get the ip for the router? From that same workstation.
Originally Posted by tj_nt
February 9th, 2007, 04:57 PM
if you run ipconfig it will return the local system IP as well as the gateway...which will be the router's IP if the system is patched into the network through a router. This will not do you any good as far as informing you of the IP so you can tunnel into the cams.
What else is the remote system responsible for other than the cams?
Have you considered installing Linux on the remote system?
ISP Dynamic IP
How do I do if I want to detect my ISP provided Dynamic IP?
October 28th, 2008, 07:32 PM
>>>How do I do if I want to detect my ISP provided Dynamic IP
ISP provided Dynamic IP - it's you external IP.. you can find it here
November 14th, 2008, 10:36 PM
Why wouldn't you use a dynamic dns service like dyndns.com?
You install a client update applet on the pc and it keeps dyndns current with your camera's IP then you just reference it by name.
Don't know about you, but I get enough email already, I don't need a camera emailing me with it's ip address. And what about the time from ip change until next email? It's ok to be out of touch that long? Finding a balance between email frequency and lag between updates to email would be a pain. And you know the time you need to reach it in a hurry is when it will be changed and not yet emailed.