Jump to content

Windows Server changed ip notifier


Recommended Posts

There shouldn't be a need to test if an IP address changes every minute, what is the lease time of the IP address set to on the DHCP server? Why doesn't the server itself have a static IP address by the way?

If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.
Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag Gude
How to ask questions the smart way!

I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from.

Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays.  -  ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script.  -  Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label.  -  _FileGetProperty - Retrieve the properties of a file  -  SciTE Toolbar - A toolbar demo for use with the SciTE editor  -  GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI.  -   Latin Square password generator

Link to comment
Share on other sites

8 hours ago, BrewManNH said:

There shouldn't be a need to test if an IP address changes every minute, what is the lease time of the IP address set to on the DHCP server? Why doesn't the server itself have a static IP address by the way?

My brother and some of my friends, sometimes they Shutdown my server, then after 5 minute Server starts automatically

 

In this process, ip will be changed, i want to make a program to run at startup IF Server ip changed THEN post action to this site:

api.telegram.com

Edited by Colduction
Link to comment
Share on other sites

  • Developers
18 minutes ago, Colduction said:

In this process, ip will be changed,

..but the question was why it changes as the DHCP lease should still be valid in the DHCP server?

Jos

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

3 minutes ago, Jos said:

..but the question was why it changes as the DHCP lease should still be valid in the DHCP server?

Jos

The server isn't run at DHCP settings

Sometimes My brother set DHCP at ExpressVPN settings and it will be changes

Link to comment
Share on other sites

  • Developers

Whatever...  just create a script testing for @IPAddress1 in a loop and verify whether it changed.

Jos

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

  • Developers

Define Real IP address? Is that you internal WiFI/LAN IP address you see when you do IPCONFIG /all, or the Internet (natted) IP address?

Jos

Edited by Jos

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

  • Developers

RD? 

You really need to try to be clear about all of this in case you want any proper help. ;) 

Edited by Jos

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

  • 3 weeks later...
On 3/5/2019 at 2:07 PM, Jos said:

RD? 

You really need to try to be clear about all of this in case you want any proper help. ;) 

Yeah, on some of my RDs, the real IP that we connect from Personal computer to it, sometimes is @IPAddress1 or @IPAddress2 or @IPAddress3 or _GetIP()

But i want automatically detect the real ip that we connect to RD by it

Link to comment
Share on other sites

Is this server IP address you're looking for an LAN IP (internal network) or an internet IP address?

If it's an internet IP address that changes, look at _GetIP() function, if it's an internal IP, then the @IPAddress# macros should work.

If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.
Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag Gude
How to ask questions the smart way!

I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from.

Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays.  -  ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script.  -  Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label.  -  _FileGetProperty - Retrieve the properties of a file  -  SciTE Toolbar - A toolbar demo for use with the SciTE editor  -  GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI.  -   Latin Square password generator

Link to comment
Share on other sites

12 hours ago, BrewManNH said:

Is this server IP address you're looking for an LAN IP (internal network) or an internet IP address?

If it's an internet IP address that changes, look at _GetIP() function, if it's an internal IP, then the @IPAddress# macros should work.

I want this IP that we connect to Remote Computer

Screenshot_2019-03-17-14-55-52-1.thumb.png.42f78d57f6fad5b26405c7adcf0aef6d.png

Some of these Remote Addresses of these Computers can get via @IPAddress1 and another one via _GetIP() 

I want to detect these IP Addresses when i lunch it in these remote computers

Link to comment
Share on other sites

Not sure who set up those "servers" but if the IP address changes you'd need to use the _GetIP function to find out it's world address. Those are all internet IP address shown, so _GetIP is the way to find out what they are. But _GetIP has to be run FROM the servers, unless they're using something like DynDNS or one of the other dynamic DNS  services.

If I posted any code, assume that code was written using the latest release version unless stated otherwise. Also, if it doesn't work on XP I can't help with that because I don't have access to XP, and I'm not going to.
Give a programmer the correct code and he can do his work for a day. Teach a programmer to debug and he can do his work for a lifetime - by Chirag Gude
How to ask questions the smart way!

I hereby grant any person the right to use any code I post, that I am the original author of, on the autoitscript.com forums, unless I've specifically stated otherwise in the code or the thread post. If you do use my code all I ask, as a courtesy, is to make note of where you got it from.

Back up and restore Windows user files _Array.au3 - Modified array functions that include support for 2D arrays.  -  ColorChooser - An add-on for SciTE that pops up a color dialog so you can select and paste a color code into a script.  -  Customizable Splashscreen GUI w/Progress Bar - Create a custom "splash screen" GUI with a progress bar and custom label.  -  _FileGetProperty - Retrieve the properties of a file  -  SciTE Toolbar - A toolbar demo for use with the SciTE editor  -  GUIRegisterMsg demo - Demo script to show how to use the Windows messages to interact with controls and your GUI.  -   Latin Square password generator

Link to comment
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
 Share

×
×
  • Create New...