nlgma Posted January 9, 2008 Share Posted January 9, 2008 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 More sharing options...
Fossil Rock Posted January 9, 2008 Share Posted January 9, 2008 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! Link to comment Share on other sites More sharing options...
nlgma Posted January 9, 2008 Author Share Posted January 9, 2008 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 More sharing options...
Fossil Rock Posted January 9, 2008 Share Posted January 9, 2008 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! Link to comment Share on other sites More sharing options...
nlgma Posted January 9, 2008 Author Share Posted January 9, 2008 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 More sharing options...
Fossil Rock Posted January 9, 2008 Share Posted January 9, 2008 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! Link to comment Share on other sites More sharing options...
covaks Posted January 9, 2008 Share Posted January 9, 2008 You could reset network settings with netsh, or with WMI. For an example on disabling DHCP and setting ip info with WMI Click here Link to comment Share on other sites More sharing options...
Nevin Posted January 9, 2008 Share Posted January 9, 2008 If the router is telnet capable, you could just telnet into her router from wherever you are, right? Link to comment Share on other sites More sharing options...
cyberworm Posted January 10, 2008 Share Posted January 10, 2008 Just make the router give the computer the same IP Address all the time. Boom done Link to comment Share on other sites More sharing options...
nlgma Posted January 14, 2008 Author Share Posted January 14, 2008 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 More sharing options...
Fossil Rock Posted January 14, 2008 Share Posted January 14, 2008 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! Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now