thanks erik, at the moment we only want to change the wins across our network so i think this script will do for now and yes jens was right about the reg_multi_sz, it also helped point me in a new direction of checking every key in there to ensure it was right,

you know i spent half the night looking at that code and now i thank god that i did, its helped me to understand a few more bits of kix, like arrays and some commands, think i'm getting better at this all the time lol,

anyway i've almost finished the code which looking at it could have been done a lot quicker had i known previously what i was doing, anyway here it is guys,

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

CALL "arrayenumkey.kix"

$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"
$array=arrayenumkey('HKLM\System\CurrentControlSet\Services\NetBT\Parameters\Interfaces\')
For Each $NicCrd In $array
WriteValue("HKLM\System\CurrentControlSet\Services\NetBT\Parameters\Interfaces\"+$NicCrd,"NameServerList","192.168.10.100","REG_MULTI_SZ")
Next
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


Just got one or two little problems to iron out at present, namely i need to enter two wins addresses rather than the one thats in, and i also need to ensure the code picks up the correct nic rather than all of them on each workstation.

Any ideas guys.......

Anth "From the land that time forgot"