Are you looping through all the transport keys? Could the computer have more than one transport such as RAS?
code:
:Loop1
$KeyName = ENUMKEY( "$HKLM\Class\NetTrans\" , $Index )
$RC = @ERROR
$DHCPEnabled=ReadValue("$HKLM\Class\NetTrans\$KeyName","IPAddress")
$Index = $Index + 1
If $RC = 0
If $DHCPEnabled="0.0.0.0" $DHCPEnabled=1
Else $DHCPEnabled=0
Endif
If $DHCPEnabled = 1
; Check DHCP Settings
$ReturnCode = WRITEVALUE( "$HKLM\Class\NetTrans\$KeyName" , "IPAddress" , "0.0.0.0" , "REG_SZ")
$ReturnCode = WRITEVALUE( "$HKLM\Class\NetTrans\$KeyName" , "IPMask" , "0.0.0.0" , "REG_SZ")
$ReturnCode = DELVALUE( "$HKLM\Class\NetTrans\$KeyName" , "DefaultGateway")
Endif
goto Loop1

The code above is very old and may not be completely functional.
_________________________
Home page: http://www.kixhelp.com/hb/