Jump to content

Static IP address


nlgma
 Share

Recommended Posts

I'm sure it's a simple little 20 lines code script, But I was wondering if someone had some code sitting around. I need a script that keeps a uses pc with the same static IP. I plan on running the script as a windows service.

Link to comment
Share on other sites

I'm sure it's a simple little 20 lines code script, But I was wondering if someone had some code sitting around. I need a script that keeps a uses pc with the same static IP. I plan on running the script as a windows service.

Why wouldn't you just set the IP to static and be done with it ?

Agreement is not necessary - thinking for one's self is!

My-Colors.jpg

cuniform2.gif

Link to comment
Share on other sites

Why wouldn't you just set the IP to static and be done with it ?

The users keep renewing their IP or manually changing it.. If I can't stop the user from releasing it or changing it. Then I was hopping to use a script that monitors the IP for change and sets it back to static and to the IP address I assigned it.

Link to comment
Share on other sites

The users keep renewing their IP or manually changing it.. If I can't stop the user from releasing it or changing it. Then I was hopping to use a script that monitors the IP for change and sets it back to static and to the IP address I assigned it.

Is there a reason why it matters if it gets changed?

Agreement is not necessary - thinking for one's self is!

My-Colors.jpg

cuniform2.gif

Link to comment
Share on other sites

Ok, My mom is not the smartest when it comes to computers, I have a opened a port on the router to VNC into her computer. Her Comcast goes down every other day and when she calls them to fix it. They set her up with DHCP enabled. booooo....... No mom! Your on a static IP!, call me be for you call them.... Yeah I've said that 4 or 9 times now. I'm almost done with the script.

Link to comment
Share on other sites

Ok, My mom is not the smartest when it comes to computers, I have a opened a port on the router to VNC into her computer. Her Comcast goes down every other day and when she calls them to fix it. They set her up with DHCP enabled. booooo....... No mom! Your on a static IP!, call me be for you call them.... Yeah I've said that 4 or 9 times now. I'm almost done with the script.

Both computers on a local network? If so, you should be able to connect to her computer with the machine name as opposed to the IP address. Another thing you can do is turn off DHCP in the router and assign static IPs.

Agreement is not necessary - thinking for one's self is!

My-Colors.jpg

cuniform2.gif

Link to comment
Share on other sites

I'm unable to telnet in to the router or make the router give the computer the same IP every time. I did learn about NETSH, Very nice command. I wrote a script the monitors her IP for change, if it changes then "netsh interface ip set address "Local Area Connection" static 192.168.0.10 255.255.255.0 192.168.0.1 1". It works.

Link to comment
Share on other sites

I'm unable to telnet in to the router or make the router give the computer the same IP every time. I did learn about NETSH, Very nice command. I wrote a script the monitors her IP for change, if it changes then "netsh interface ip set address "Local Area Connection" static 192.168.0.10 255.255.255.0 192.168.0.1 1". It works.

What's the brand and model number of the router?

Agreement is not necessary - thinking for one's self is!

My-Colors.jpg

cuniform2.gif

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

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...