Anth,
You will have to test this, as I don't have W2k but this should work
code:
; Kix script to 'fix' registry keys with regards to NIC's
; Authored from Kix Bulletin Board, courtesy of grasshopper, sealeopard and all those who helped
$NicKey = EnumKey("HKLM\Software\Microsoft\Windows NT\CurrentVersion\NetworkCards\",0)
$NicCrd = ReadValue("HKLM\Software\Microsoft\WindowsNT\CurrentVersion\NetworkCards\"+$NicKey,"ServiceName")
$TCPIPUpdate=ReadValue("HKLM\SOFTWARE\MyCompany\DesktopSettings","TCPIPUpdate")
If $TCPIPUpdate<>"Updated"
If @PRODUCTTYPE="Windows 2000 Professional"
WriteValue("HKLM\System\CurrentControlSet\Services\NetBT\Parameters\Interfaces\"+$NicCrd,"NameServerList","192.168.10.100|192.168.10.101","REG_MULTI_SZ")
WriteValue("HKLM\System\CurrentControlSet\Services\Tcpip\Parameters", "Domain","", "REG_SZ")
WriteValue("HKLM\System\CurrentControlSet\Services\Tcpip\Parameters", "NameServer","", "REG_SZ")
WriteValue("HKLM\System\CurrentControlSet\Services\Tcpip\Parameters", "SearchList","","REG_SZ")
EndIf
WriteValue("HKLM\SOFTWARE\MyCompany\DesktopSettings","TCPIPUpdate","","REG_SZ")
EndIf
The arrayenumkey is what writes the entries to all cards so removing it should now only write to the nic in use.
Give it a try anyway.
Grasshopper75
[ 24. June 2003, 17:48: Message edited by: Grasshopper75 ]