Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Map Drive dialog
Message
From
30/01/2009 07:22:32
 
 
To
30/01/2009 07:04:52
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Vista
Miscellaneous
Thread ID:
01378392
Message ID:
01378403
Views:
30
>>Does anyone know how to open the Windows Explorer Map Network Drive dialog from Fox?
>
>You can map network shares without this dialog.
>if !directory('p:')
>   wshshell=CREATEOBJECT('wscript.shell')
>   wshnetwork=CREATEOBJECT('wscript.network')
>   wshnetwork.MapNetworkDrive('p:','\\myserver\mypath',.f.,'Username','Password')
>   wshnetwork=.null.
>   release wshnetwork
>Endif
>Replace .f. with .t. to get a persistent mapping.

I have considered this approuch, but thought that I could use the existing dialog built in to Windows.

Perhaps there is a API call or a exposed method in the Explorer application that accessed through a COM style object.
Greg Reichert
Previous
Reply
Map
View

Click here to load this message in the networking platform