Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Win2000 and mapping a drive problem
Message
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Title:
Win2000 and mapping a drive problem
Miscellaneous
Thread ID:
00613353
Message ID:
00613353
Views:
44
When the following code gets run on Win2000 a new window pops up showing the newly mapped drive. How can we supress this window? We don't have this problem on NT or Win9X OSs. We would rather the users not be confused with this new window.
function NetConnect
LPARAMETERS Lc_DRIVE, Lc_SERVER, Lc_USER, Lc_PASSWORD

*First attempt to connect via WSH
nlerror=.f.
ON ERROR nlerror=.t.
oNet = CREATEOBJECT('WScript.Network')
IF NOT nlerror	&&WSH available!
   oNet.MapNetworkDrive(Lc_DRIVE, Lc_SERVER,, Lc_USER, Lc_PASSWORD)
   IF NOT nlerror	&&Map ok!
      ON error
      RELEASE oNet
      RETURN .T.
   endif
ENDIF
ON ERROR
TIA

It's Time to get a gun.

That's what I've been thinkin.

I think I can afford one, If I do a little less Drinkin.

www.TrueGeeks.com
Next
Reply
Map
View

Click here to load this message in the networking platform