Link to home
Start Free TrialLog in
Avatar of Tek Info
Tek Info

asked on

Script that will update a computer's default Ethernet IPV4 settings

I would like to configure a script so that a user can simply click on it and it will configure their default Ethernet IPV4 settings to what I configured in the script.
I would like to configure the IP address, Subnet, Default Gateway, and Preferred and Alternate DNS.
I want to make it as simple as possible for them to click on the script and it will make the changes.

Avatar of skullnobrains
skullnobrains

a series of netsh commands will do.

netsh int ip set address static 1.2.3.4 ...

you can setup the network mask and broadcast in the same command, probably the gateway as well. static routes would be added with a similar command. dhcp setup is feasible as well.
stick the commands in a text file and name it whatever.bat
 Is there anything wrong with DHCP? (which would work for a lot more systems).
ASKER CERTIFIED SOLUTION
Avatar of hypercube
hypercube
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Tek Info

ASKER

Thanks Fred.
I will presume this will work and will see if I can get help to prompt for the variables now..
Have a great day. 
If I understand, prompting for the variables would seem to take away from the objectives.
But then, I use this at rather specific sites so there are fewer "variables" to be set.
And, I use this for my own computer in a static-IP environment mostly, so the IP addresses stay the same.
But doing it more expansively seems beyond the original objective.  ??