OK, if share we must... but not doing silver platter stuff. 
Code:
break on
$File = 'C:\WINDOWS\system32\drivers\etc\services'
$NewFile = 'C:\WINDOWS\system32\drivers\etc\services.new'
$NewFileHandle = freefilehandle()
$LineToFind = 'hostname 101/tcp hostnames #NIC Host Name Server'
$LineToAdd = 'newline 100/tcp newline #test'
$Array = ReadFile($File,,)
$LineNum = AScan($Array,$LineToFind)
'Line Number = ' +$LineNum ?
$index = 0
If Open($NewFileHandle,$NewFile,5) = 0
For Each $Element in $Array
If $index = $LineNum
$ = WriteLine($NewFileHandle,$LineToAdd + @CRLF)
EndIf
$ = WriteLine($NewFileHandle,$Element + @CRLF)
$index = $index + 1
Next
EndIf
p.s. needs the ReadFile() UDF from here.
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.