Skip Navigation Links

Changing NIC from DHCP to Fixed IP

This one is actually a little tricky.

You might assume that you simply change some reg keys, reboot the box and that takes care of it ... but it does not.

 

To accomplish this task, you need to use an NI execute command, involving the build in netsh command of the OS.

Preperation:

1. Generate a proper configuration file that can be executed later with netsh. Simply configure the NIC as desired and run 

NETSH INTERFACE DUMP  piped it into a text file.

When looking at the text file, you can see all the settings and parameters for all the interfaces you might want to mess with.

2. Put placeholders in the file (e.g. THIS_IS_THE_IP) insted of the actual IP address (or other values you want to change dynamically).

The NetInstall Script:

First Install this tuned up text file with an InstallFileList command to the local temp directory.

Then use a replace command to adjust the values in the text file

Replace Placeholder with the actual values (read from an ini file or wherever you have the server IPs stored on you network)

Replace THIS_IS_THE_IP by %Actual_IP%

 

Finally run the netsh command with an

execute cmd.exe /c netsh exec %temp%\textfile.txt

No reboot required:-)

 

 

NETSH can do much more for you, you just have to play with it

...... carefully !

 

 

 



© www.prodeploy.com    Monday, June 11, 2007 5:37 PM hweeres

News

Tipps and Tricks

updated

Call us

Our office hours are

Monday - Friday 9:00 AM - 5:00 PM CST

Tel: 847 428 5859 / Fax: 847 836 5763

© 2012 ProDeploy, Inc,  All rights reserved.  Terms of Use | Login
TransStart live™ is copyright 2005-2012 by Transresult Chicago