Add this to your script, instead of the USE DIR \\COMP\SHARE :
code:

$NetUSeToDoDir="\\Comp\Share"
$NetUSeToDoDrive="P:"

If instr($NetUSeToDo,@WKSTA)>0
;you can do a subst, if you really need it, but i'm not sure it'll work on share dir.
;If you do a subst, remember to do a "subst drive /delete" before the "subst Drive Directory"
else
USE $NetUSeToDoDrive /DELETE /PERSISTENT
USE $NetUSeToDoDrive $NetUSeToDoDir
endif



Et voilą
_________________________
? getobject(Kixtart.org.Signature)