| Forum Home | ||||
| Press F1 | ||||
| Thread ID: 102753 | 2009-08-31 03:49:00 | Display IP Address from http://checkip.dyndns.org in batch script | Chilling_Silence (9) | Press F1 |
| Post ID | Timestamp | Content | User | ||
| 805609 | 2009-08-31 03:49:00 | Hey all, So I've got two internet connections on this LAN at work. I want a quick & easy way to switch between them so I've written: @ECHO OFF echo Changing to Orcon (Main) connection - 172.31.3.1 route change 0.0.0.0 mask 0.0.0.0 172.31.3.1 metric 25 netsh interface ip set dns name="Local Area Connection" source=static addr=172.31.3.2 netsh interface ip add dns name="Local Area Connection" addr=208.67.222.222 pause However, what I also want is a quick & easy way for it to display my public-IP from http://checkip.dyndns.org in the command window / batch script, so that I can be assured the change has gone through. Is there an easy way to do this, short of opening the browser window? Cheers Chill. |
Chilling_Silence (9) | ||
| 805610 | 2009-09-01 21:02:00 | Bump... Anybody have any ideas? :D Even if I went about it another way, getting the public-facing IP Address ...? Thanks Chill. |
Chilling_Silence (9) | ||
| 805611 | 2009-09-01 21:42:00 | You can't do this from a standard windows shell, you'll need to call another app - easiest method would be to use a windows binary for curl or wget that you can integrate into your script. | Erayd (23) | ||
| 1 | |||||