Ju:

this line

code:

$nul = writeline(2,"\\$dhcpcname$cr") "."

Is what prints to the file (really it does 2 things, prints to the $outfile and puts a '.' on the screen). There are two variables $DHCPName and $DHCPIP, I first wrote that program to print out the UNC using the IP address (\\$dhcpip) But i think you asked for the name instead (\\$dhcpname).

Anyways Modify the WRITELINE() commend on that line to write $DHCPName and $DHCPIP to the $outfile.

Glad I could be of help!
Bryce