Go to Post Whatever you do though, don't get into an "us versus them" mentality with your mentors. They are there to help. - Bongle [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #7   Spotlight this post!  
Unread 01-01-2013, 01:19
Azrathud's Avatar
Azrathud Azrathud is offline
Computer Nerd
AKA: Bryce Guinta
FRC #2945 (BANG)
Team Role: Programmer
 
Join Date: Jan 2010
Rookie Year: 2010
Location: Colorado
Posts: 24
Azrathud is on a distinguished road
Re: Tool to Manage Static Computer IP

Quote:
Originally Posted by apalrd View Post
You could just go Start->Run->type 'cmd' (usually already typed in since I almost certainly used it last) -> ipconfig /all
ipconfig /all shows interfaces I don't care about. I really wanted a way to just show basic interface information that doesn't make me hunt for the information.

Quote:
Originally Posted by apalrd View Post
Same thing for the config. I used to write Batch and Perl scripts to do it, then I got lazy and just remembered the command to type ('netsh interface ipv4 set address "Local Area Connection" static 10.0.33.217 255.0.0.0'). Roughly the same number of mouse strokes (which are highly more time-consuming than keystrokes), especially if I don't have the folder with the batch file open or I'm not on my computer.
With using script to toggle between static and DHCP, I remove any errors that I may make with signaling what static IP I want(which avoids IP address conflicts), and it saves time and patience for me.



Quote:
Originally Posted by apalrd View Post
My best solution is to just use WiFi only for real networks, and use wired Ethernet only for robot networks. But, in case I have to break this, then I can just type netsh and be done.
Sometimes my team needs the robot to be using the wireless network for increased mobility(although I do generally use wired for the static internet-lacking network and wireless for internet access), and I use my personal computer to work on the robot, so, at the end of the day, I don't want my wired interface to be set to a static IP.

Quote:
Originally Posted by apalrd View Post
But, if you do still want to do it this way, it should be possible to do entirely in a shell script, reducing dependencies on a foreign machine to zero.
I opted for python over solely batch(thus not reducing the dependencies to zero) because batch makes simple things like storing the output of a program into a variable painful. I honestly tried to use only batch, but I couldn't bear using it after a point.

Quote:
Originally Posted by BigJ View Post
Along with Andrew's info you should be able to achieve a toggling script by using an environment variable.
Using an environment variable sounds kind of hackish; the only way I could imagine being able to make a toggle of sorts would be to stuff practically a batch script into a variable that I execute. I really don't want to use the command-line directly to execute my program because then I would have to worry about editing the path variable to where I store the batch files, and I would need to run the prompt as administrator to change my IP, and I would need to type in the program name, as to apposed to just hitting the windows key once, the down arrow key, and then enter as I have it now.

The work is done; feel free to use it or not.
 


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


All times are GMT -5. The time now is 06:35.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi