Ok I'm totally lost since now it works...

 Code:
? "check primapstate connection to printer name"
?
if primapstate("\\server\HP LaserJet P4014/P4015 PCL6")
? "delete printer from printer name"
   $RC=delprinterconnection("\\server\HP LaserJet P4014/P4015 PCL6")
   ? "result 2: "+@Error+" - "+@SError
Else ? "primapstate check didn't find the printer"
Endif
?


Edit: Thanks for all your help guys and keep the good work on a great software.


Edited by cividan (2011-11-22 10:56 PM)