/build/static/layout/Breadcrumb_cap_w.png

Network Setting in a unattended install Windows 7

I am working on a unattended install for Windows 7 64 bit. I successfully installed Windows 7, grab the computer name then rename the computer, add it to the domain, and turn off the User Access Control. I am now working on network settings and some advanced network settings. I need to do the following:

1) Select the "Use the following DNS server addresses" button
2) Add a perferred DNS server and alternate DNS server
3) Append a DNS suffix with scc.county.zone
4) Add a DNS suffix for this connection (scc.county.zone)
5) Add two IP addresses in the WINS tab

Does anyone have a sample xml file or know how to do the above?

Kurt

0 Comments   [ + ] Show comments

Answers (1)

Posted by: kwoodfin 13 years ago
Orange Belt
0
I never received a response on this post, and I was unable to figure out how to do this in the unattend.xml file. I wrote a script instead. If anyone is interested, here is what I came up with. I have no training in VB scripts, but it works.

Dim strWINSPrimaryServer, strWINSSecondaryServer
strComputer = "."
Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
Set colNetAdapters = objWMIService.ExecQuery _
("Select * from Win32_NetworkAdapterConfiguration where IPEnabled=TRUE")
Set objNetworkSettings = objWMIService.Get("Win32_NetworkAdapterConfiguration")
strDNSServers = Array("1.2.3.4","5.6.7.8")
strDNSSuffixes = "yournetwork"
strWINSPrimaryServer = "1.2.3.4"
strWINSSecondaryServer = "5.6.7.8"
arrDNSSuffixes = Array("yournetwork")
For Each objNetAdapter in colNetAdapters
objNetAdapter.SetWINSServer strWINSPrimaryServer, strWINSSecondaryServer
objNetAdapter.SetDNSServerSearchOrder(strDNSServers)
objNetAdapter.SetDNSDomain(strDNSSuffix)
objNetworkSettings.SetDNSSuffixSearchOrder(arrDNSSuffixes)

' DNS suffix for this connection
intSetDomain = objNetAdapter.SetDNSDomain("yournetwork")

' Register this connections address in DNS, Use this connections DNS suffix in DNS registration
intDynReg = objNetAdapter.SetDynamicDNSRegistration (True, False)
Next

Comments:
  • ' Register this connections address in DNS, Use this connections DNS suffix in DNS registration
    intDynReg = objNetAdapter.SetDynamicDNSRegistration (True, False)
    Next

    DNS and WINS vbs script is working in Win10,
    But "tick" the option in "Use this connection DNS sufix in DNS registration" , it is not working in Win10, may i know how can i fix it , thanks a lot - Shenmue2 6 years ago
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.

Don't be a Stranger!

Sign up today to participate, stay informed, earn points and establish a reputation for yourself!

Sign up! or login

Share

 
This website uses cookies. By continuing to use this site and/or clicking the "Accept" button you are providing consent Quest Software and its affiliates do NOT sell the Personal Data you provide to us either when you register on our websites or when you do business with us. For more information about our Privacy Policy and our data protection efforts, please visit GDPR-HQ