i need a script to change DNS and WINS
#3
#5
i seem to remember the keys have a unique ID in them but are under HKLM\SYSTEM\CurrentControlSet\Services\Tcpip\Param eters
(I think)
you can pick up the uid from another key and plug it into the reg file
(I think)
you can pick up the uid from another key and plug it into the reg file
#7
Scooby Regular
Join Date: Nov 2001
Location: Leeds - It was 562.4bhp@28psi on Optimax, How much closer to 600 with race fuel and a bigger turbo?
Posts: 15,239
Likes: 0
Received 1 Like
on
1 Post
or use the script I wrote to do it
Code:
' Change these values below ' ******************************************** strDNS1 = "1.1.1.1" strDNS2 = "1.1.1.4" strWins1= "1.1.1.1" strWins2= "1.1.1.4" strHostName = "dwallis" strDNSSuffixForConn = "dnssuffixforthisconnection.com" arrDNSSuffixes = Array("blah.co.uk", "blah.com", "blah.dc.uk.local") ' ******************************************** Set objWMIService = GetObject("winmgmts:\\.\root\cimv2") Set objNICs = objWMIService.InstancesOf( "Win32_NetworkAdapterConfiguration" ) Set objNetworkSettings = objWMIService.Get("Win32_NetworkAdapterConfiguration") For Each objNIC In objNICs If objNIC.IPEnabled Then wscript.echo objNic.description 'If objNIC.DHCPEnabled = False Then 'If Not IsNull(objNIC.DNSServerSearchOrder) Then ' Display current DNS Settings 'For Each strDns In objNIC.DNSServerSearchOrder ' wScript.echo objnic.Description & " DNS" & n & ":" & strDns & " " ' n = n + 1 'Next 'End If objNIC.SetWINSServer strWins1,strWins2 objNIC.SetDNSServerSearchOrder Array(strDNS1,strDNS2) 'End If End If Next objNetworkSettings.EnableDNS , strDNSSuffixForConn, , arrDNSSuffixes
Trending Topics
Thread
Thread Starter
Forum
Replies
Last Post
Sam Witwicky
Engine Management and ECU Remapping
17
13 November 2015 10:49 AM