Dear,

You only need to place those commands "USE * /delete" and "DelPrinterConnection"
when you are changing the actual status.
To prevent unnecessary removement of mapped drives you can also
use following code:
code:
; (re)mapping drive U
;
IF (Exist("U:\.") = 1)
USE U: /delete /persistent
ENDIF
USE U: "\\server\share$$"
IF (@error <> 0)
? "Warning KIX: mappings problem with drive U. error @error (@serror)"
ENDIF

greetings.
_________________________
email scripting@wanadoo.nl homepage scripting@wanadoo.nl | Links | Summary of Site Site KiXforms FAQ kixtart.org library collection mirror MCA | FAQ & UDF help file UDF kixtart.org library collection mirror MCA | mirror USA | mirror europe UDF scriptlogic library collection UDFs | mirror MCA