Thanks for your input. Basically I'm still struggling as I'm not a programmer, just a beginner to this. I'm trying to automate changing mainly Windows NT machines from static IP addresses to DHCP, but have different registry places to amend depending on the network card installed (4 or 5 flavours).
' VBScript.
Set Sh = CreateObject("WScript.Shell"

key = "HKLM\SYSTEM\CurrentControlSet\Services\"
on error resume next
WScript.Echo Sh.RegRead(key & "E1000\"
Then if that key (not value) exists run a batch file, if not continue to the next attempt to match ie
WScript.Echo Sh.RegRead(key & "El90x1\"
If successful run another batchfile
Each batch file basically calls regedit /s then a registry merge file eg. E190x1.reg where
E190x1.reg contains:-
REGEDIT4
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\El90x1\Parameters\Tcpip]
"EnableDHCP"=dword:00000001
"UseZeroBroadcast"=dword:00000000
[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\NetBT\Adapters\El90x1]
"NameServer"=""
"NameServerBackup"=""
"DhcpNameServer"="193.35.107.102"
"DhcpNameServerBackup"="193.35.99.3"
This could presumably be entered directly into the script using regwrite commands?