Any way to create a batch file

cpars

Golden Member
Feb 4, 2000
1,709
0
71
I have remote desktop connection setup to run on my aunts machine in another state so I can help her out from time to time and it worked fine until charter changes the dynamic IP and i have to go through headache of walking her through to get me the new Ip address. Is there some way to setup a bat file to run ipconfig and send results through an email once every two weeks or so ?
 

mundane

Diamond Member
Jun 7, 2002
5,603
8
81
You could set her up with a dyndns.org account, they're free. I use one for my Remote Desktop connection to home. Just have a small client (a number of them are listed on the website) running on her system, which will routinely update the dyndns.org database with any IP udpates.
 

cpars

Golden Member
Feb 4, 2000
1,709
0
71
Thats a good solution ! I forgot about that. maybe be the best way to go
 

TSDible

Golden Member
Nov 4, 1999
1,697
0
76
Also,

If she is behind a router, some routers will actually support a given Dynamic DNS service.

I know that both Linksys and D-link do this. Not sure about others.
 

BlueWeasel

Lifer
Jun 2, 2000
15,940
474
126
I used to do this using a program called IPMonitor that could sent out an email or upload a custom HTML everytime the IP address changed. However, since switching to a DynDNS.org account, it's been uninstalled from my system.
 

SaintTigurius

Senior member
Apr 3, 2003
332
0
0
@echo off

echo Put IP address into file...
ipconfig.exe >IP-to-file.tmp

echo Leave only lines that contain "IP Address"
FINDSTR /I /C:"IP Address" IP-to-file.tmp >Computer-IP-address.txt

del Computer-IP-Address.txt

echo done




this will get u the IP address

open the IP-to-file.tmp with notpad and u should see the ip , subnet gateway, tryting to figure out how to email it.
 

SaintTigurius

Senior member
Apr 3, 2003
332
0
0
Ok this is what i figured out, having still a bit trouble

if i open CMD and type one line at a time it cool but having difficutly putting it in a batch file

THIS IS WHAT I DO

ipconfig | findstr "IP Address"

for /f "tokens=15" %a in ('ipconfig ^| find "IP Address"') do @set addr=%a

start mailto:9niak@mn.com?subject=%addr%

some one help me put this in a batch file? than it will wokr for u
 

BlueWeasel

Lifer
Jun 2, 2000
15,940
474
126
Originally posted by: SaintTigurius
Ok this is what i figured out, having still a bit trouble

if i open CMD and type one line at a time it cool but having difficutly putting it in a batch file

THIS IS WHAT I DO

ipconfig | findstr "IP Address"

for /f "tokens=15" %a in ('ipconfig ^| find "IP Address"') do @set addr=%a

start mailto:9niak@mn.com?subject=%addr%

some one help me put this in a batch file? than it will wokr for u


I don't think that will work. Is is possible to run start mailto from the command line?....I don't think so.
 

SaintTigurius

Senior member
Apr 3, 2003
332
0
0
don't think that will work. Is is possible to run start mailto from the command line?....I don't think so.
Yes it does work give it a try

ipconfig | findstr "IP Address"
for /f "tokens=15" %%a in ('ipconfig ^| find "IP Address"') do @set addr=%%a
start mailto:9smiak@en.com?subject=%addr%


this works when instered into a batch file now, just i have to press enter 3 times before the ip address is setup in the subject,, i have no idea why but i am trying to figure it out
 

BlueWeasel

Lifer
Jun 2, 2000
15,940
474
126
I copy and pasted your 3 lines into Notepad and saved it as IP.bat. I just doubleclicked on the BAT file and it loads up my default mail client with the address and subject in the correct places. I wasn't prompted to hit enter at any time.
 

BlueWeasel

Lifer
Jun 2, 2000
15,940
474
126
Originally posted by: SaintTigurius
hmm, so the subject had ur ip address ?

what the hell its not working for me

Yup, Outlook Express loaded up, then new message screen popped up, and my email address was in the first line, and the IP address was in the subject line.

Another thing to consider is if the computer is behind a router. In my case at work, the IP that IPconfig reads is my LAN address, not the public IP. If she's behind a router, then just reading from IPconfig won't work.
 

SaintTigurius

Senior member
Apr 3, 2003
332
0
0
thats true, just trying to see if could of figured it out.. its the geek in me lol, that drives me to it. lol


BUt if ur using a router, most routers have to ability of sending the log to an e-mail address so when a new ip is changed on the router u get a log of it.
 

SaintTigurius

Senior member
Apr 3, 2003
332
0
0
no i dea why it started to work now , meh, thx for the help

So hear it is

ipconfig | findstr "IP Address"
for /f "tokens=15" %%a in ('ipconfig ^| find "IP Address"') do @set addr=%%a
start mailto:9iak@mn.com?subject=%addr%


this should do it for u
 

cpars

Golden Member
Feb 4, 2000
1,709
0
71
wow! thanks for all your work while i was at work

I will try that out this evening and let you know if it works for me.
much appreciated
 

cpars

Golden Member
Feb 4, 2000
1,709
0
71
worked like a champ, I just scheduled it to run every day and all she has to do is click send when she sits down at her pc.
99 % automated
 
sale-70-410-exam    | Exam-200-125-pdf    | we-sale-70-410-exam    | hot-sale-70-410-exam    | Latest-exam-700-603-Dumps    | Dumps-98-363-exams-date    | Certs-200-125-date    | Dumps-300-075-exams-date    | hot-sale-book-C8010-726-book    | Hot-Sale-200-310-Exam    | Exam-Description-200-310-dumps?    | hot-sale-book-200-125-book    | Latest-Updated-300-209-Exam    | Dumps-210-260-exams-date    | Download-200-125-Exam-PDF    | Exam-Description-300-101-dumps    | Certs-300-101-date    | Hot-Sale-300-075-Exam    | Latest-exam-200-125-Dumps    | Exam-Description-200-125-dumps    | Latest-Updated-300-075-Exam    | hot-sale-book-210-260-book    | Dumps-200-901-exams-date    | Certs-200-901-date    | Latest-exam-1Z0-062-Dumps    | Hot-Sale-1Z0-062-Exam    | Certs-CSSLP-date    | 100%-Pass-70-383-Exams    | Latest-JN0-360-real-exam-questions    | 100%-Pass-4A0-100-Real-Exam-Questions    | Dumps-300-135-exams-date    | Passed-200-105-Tech-Exams    | Latest-Updated-200-310-Exam    | Download-300-070-Exam-PDF    | Hot-Sale-JN0-360-Exam    | 100%-Pass-JN0-360-Exams    | 100%-Pass-JN0-360-Real-Exam-Questions    | Dumps-JN0-360-exams-date    | Exam-Description-1Z0-876-dumps    | Latest-exam-1Z0-876-Dumps    | Dumps-HPE0-Y53-exams-date    | 2017-Latest-HPE0-Y53-Exam    | 100%-Pass-HPE0-Y53-Real-Exam-Questions    | Pass-4A0-100-Exam    | Latest-4A0-100-Questions    | Dumps-98-365-exams-date    | 2017-Latest-98-365-Exam    | 100%-Pass-VCS-254-Exams    | 2017-Latest-VCS-273-Exam    | Dumps-200-355-exams-date    | 2017-Latest-300-320-Exam    | Pass-300-101-Exam    | 100%-Pass-300-115-Exams    |
http://www.portvapes.co.uk/    | http://www.portvapes.co.uk/    |