if !directory('p:') wshshell=CREATEOBJECT('wscript.shell') wshnetwork=CREATEOBJECT('wscript.network') wshnetwork.MapNetworkDrive('p:','\\myserver\mypath',.f.,'Username','Password') wshnetwork=.null. release wshnetwork EndifReplace .f. with .t. to get a persistent mapping.