October 14, 200421 yr I am working on a system that has 700 users. They do not have active directory installed. I am moving them over to a new DNS Server and preparing them for moving over to active directory, but they do not want to do it all at one time. But, they want the new DNS server now. Well, here is my problem. I need to change 700 TCP/IP Settings. Now, making a logon script is a simple solution. Here is what I have so far: [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\]"UseDomainNameDevolution"="1" [HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\Interfaces\{02B38387-74B8-46DB-9ACC-550B7350574A}] "RegistrationEnabled"="1"Now, the top one is standard and I would be able to push that to any client that logs onto the NT Server Domain Controller. But, the 2nd one is causing a problem. The highlighted area is different on every machine. Does anyone know of a way to search the registry key and then change it?Thanks for any help. I would not look forward to doing this manually. Update..... I was actually able to figure it out. This only has the second in it right now. But, if anyone needs to looks for a key that is not a stable name, then this will help. I hope it helps someone.On Error Resume NextDim nicGUIDDim WshShellstrComputer = "."Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")Set colItems = objWMIService.ExecQuery _ ("Select * from Win32_NetworkAdapterConfiguration")For Each objItem in colItems if objItem.Index = 1 then' Wscript.Echo "Setting ID: " & objItem.SettingID nicGUID = objItem.SettingID Else End ifNextSet WshShell = WScript.CreateObject("WScript.Shell")WshShell.Run "reg.exe add HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters\Interfaces\" & nicGUID & " /v RegistrationEnabled /t REG_DWORD /d 0 /f"Wscript.echo "All is updated"
October 14, 200421 yr You can use AutoIt function "RegEnumKey" to retrieve key names and "RegWrite" to change DNS.netsh command may be able to do it too.
Please sign in to comment
You will be able to leave a comment after signing in
Sign In Now