If you read the manual page, you'd see that the function returns an error code. Since we did not catch the error code, it simply "falls out" onto the screen.

Error 123 says "The filename, directory name, or volume label syntax is incorrect." You can learn this by running
 Code:
net helpmsg 123
at a command line.

Now that you know something is wrong with your shared printer, you can prevent the return code from falling onto the screen by
 Code:
$Rv = AddPrinterConnection('\\AMT01\X7665FIN')
If Not $Rv
  @SERROR ?
Else
  'Printer was mapped' ?
EndIf
After debugging your code, you can either eliminate these messages, or provide some form of error message or recovery process when an error does occur.

Glenn
_________________________
Actually I am a Rocket Scientist! \:D