Sign in to follow this  
Followers 0
shEiD

IP in Windows 7

6 posts in this topic

Hi,

How can I find out my IP address in windows 7? I'm leaving on a trip and want to use rdp to connect to my pc. The problem is, that I'm on dynamic IP and my machine tends to shut off randomly (either there's serious problems with power in my building or my back-ups is acting up, the pc just looses power and goes dead). In case that happens, I can ask my neighbour to turn the pc on, but there's no way he's gonna be able to login and look up the IP, even with me giving the instructions over the phone ;)

I would like to write a script that would run after login to windows, look up the IP and display it in HUGE numbers on the screen :evil:

Kinda: go to my house push the power button, enter psw on login screen, wait for numbers to show up, read them to me, thank you... That's the idea. It would be enough for now.

Ideally, I would rewrite it later on to run as service and email me the IP automatically. Though I'm not sure, if network card connects to internet and gets the ip while still on the login screen? I kinda think it does. Even though, is it possible to email without login to windows?

I wouldn't normally ask and figure it out myself, but I need to get a bit of sleep, as I'm gonna be driving for ~24 hours non stop in a couple of hours...

Thanks in advance.

Share this post


Link to post
Share on other sites



There is a standard UDF _GetIP() for that.

Why not have a script get this external IP address and upload it to some public ftpserver so you can go and get it there?

Jos


Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
Share on other sites

Get a free account on DynDNS

You simply get a hostname that points to your IP. You can download a small program that keeps track of your IP and sends it to the dyndns servers whenever it changes.

Share this post


Link to post
Share on other sites

@Jos Thanks ;) Shame on me.

@autoitter Thanks. I will try that if I can't do it with au3.

So here is my simple script (it works as a charm):

#include <INet.au3>
$s_SmtpServer = "smtp"
$s_FromName = "name"
$s_FromAddress = "my.mail"
$s_ToAddress = "to.mail"
$s_Subject = "sub"
Dim $as_Body[3]
$as_Body[0] = "the new IP address:"
$as_Body[1] = _GetIP()
$as_Body[2] = @MON & "." & @MDAY & "." & @YEAR & " " & @HOUR & ":" & @MIN & ":" & @SEC
_INetSmtpMail($s_SmtpServer, $s_FromName, $s_FromAddress, $s_ToAddress, $s_Subject, $as_Body)

How do make it run as a service, before login? And would it be able to mail?

Thanks in advance.

Share this post


Link to post
Share on other sites

If you are using DnyDNS, there are clients which can run as service.

For example, the native client is able to run as a service and there are also 3rd party apps like DirectUpdate.

Running AutoItscripts as a service can result in unexpected errors and then you do not get your IP. Autostart after login is the safest method.


*GERMAN* [note: you are not allowed to remove author / modified info from my UDFs]My UDFs:[_SetImageBinaryToCtrl] [_TaskDialog] [AutoItObject] [Animated GIF (GDI+)] [ClipPut for Image] [FreeImage] [GDI32 UDFs] [GDIPlus Progressbar] [Hotkey-Selector] [Multiline Inputbox] [MySQL without ODBC] [RichEdit UDFs] [SpeechAPI Example] [WinHTTP]UDFs included in AutoIt: FTP_Ex (as FTPEx), _WinAPI_SetLayeredWindowAttributes

Share this post


Link to post
Share on other sites

Thanks everyone for the help. I'm off.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0