OK my script works fine , i must think about not to put SetdefaultPrinter BEFORE endif ...

Code:

break on

if substr(@wksta,1,5) = "PTE07"

MESSAGEBOX ("Installation de l'imprimante HP705 en cours...veuillez cliquer sur OK", "printer", 64)
AddPrinterConnection("\\PTE0705A06\HP705")
@error ?

endif


MESSAGEBOX ("définition de l'imprimante par défaut HP705", "printer", 64)
SetDefaultPrinter("\\PTE0705A06\HP705")
@error ?



Here's my final code....last problem , don't work at all with old versions of kix32....so did u know how to translate the setdefaultprinter and addprinterconnection in old kix script ?

T.Y.

BAL.