|
Question : Adding DNS & WINS configuration under advance TCP/IP settings tab using bat files
|
|
Hi
Currently, i need some help to set the advance TCP/IP settings tab using batch dos command or any other recommend method. I need to add some DNS server and DNS suffix under DNS tab and as for WINS tab i need to the wins' server ip addresses. Addition question: as for the radio or check box under the dns tab if i need to deselect or select them back what will be the method to do it?? e.g CHECK the checkbox "Use this connection's DNS suffix in DNS registration"
Thank you
|
Answer : Adding DNS & WINS configuration under advance TCP/IP settings tab using bat files
|
|
I have never had to add suffixes before, but that looks right.. but, I searched some more and discovered that these are registry settings and netsh is said not to work with this... so.. here is something else can try (I like the 2nd one myself):
http://support.microsoft.com/kb/275553
Regini.exe. The Regini.exe tool from the Microsoft Windows 2000 Resource Kit can be used to place the domain suffix search list setting into the registry. A sample Regini script is provided in the "Sample Regini Script" section of this article.
Method 1) Sample Regini script:
Create a text file with the following two lines of text and save it as the Suffix.txt file. The following spacing must be exactly as shown, where adatum.xxx signifies a domain suffix. Up to six domain suffixes may be specified. The search order is left to right.
\Registry\Machine\System\CurrentControlSet\Services\TCPIP\Parameters SearchList="testadatum.com,test2adatum.net,test3adatum.gov"
Copy the Regini.exe and Suffix.txt files to the preceding location and run the regini.exe suffix.txt command.
When the script has updated the registry, you must restart the computer for the settings to be updated.
To run the script you must have administrator or system-level access to the computer.
Method 2: Another method is to use Microsoft Windows Script Host:
1. Create a file with the .vbs extension (for example, C:\add.vbs). 2. Add the following two lines to the file:
SET WSHShell = CreateObject("WScript.Shell") WSHShell.RegWrite "HKLM\System\CurrentControlSet\Services\TCPIP\Parameters\SearchList", "testadatum.com,test2adatum.net,test3adatum.gov", "REG_SZ"
(the second line starts with "WSHShell.RegWrite" and ends with "REG_SZ")
3. Double-click the file to run or at a command prompt, type C:\add.vbs
|
|
|
|