Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Mapping and Unmapping
Message
From
17/09/1998 09:40:16
 
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Miscellaneous
Thread ID:
00137678
Message ID:
00137755
Views:
17
>>>>Try
>>>>
>>>>DECLARE Integer WNetAddConnection IN WIN32API STRING @, STRING @, STRING @
>>>>DECLARE Integer WNetCancelConnection IN WIN32API String @, INTEGER
>>>>
>>>>lcRemoteName = "\\Computer\Resource"
>>>>lcPassword = "" && Connect using no password
>>>>lcLocalName = "T:"
>>>>
>>>>? WNetAddConnection( @lcRemoteName, @lcPassword, @lcLocalName)
>>>>*-- Return 0 if all is OK
>>>>
>>>>*-- Then to disconnect ( also returns 0 for OK)
>>>>? WNetCancelConnection( @lcLocalName, 0)
>>>
>>>That works great. Now, how do make the new drive mapping part of the search path?
>>
>>Aye, there's the rub.
>>
>>Well, how about RUNning a DOS set path ... no, that was the original problem.
>>I can only suggest that you add a path entry to say... T: in your path, then as you map the drives that you want to search , always use T:
>
>That's the problem. I am at the mercy of a NW Login script, and I have to find a way to do this so the new setting scopes to the currect command session environment. So I am hoping to find a DLL way of doing this.

Why not jsut rewrite the DOS PATH environment string. You need to make sure that you don't exceed the total space allotted to the environment string space, but the API calls are pretty trivial.
EMail: EdR@edrauh.com
"See, the sun is going down..."
"No, the horizon is moving up!"
- Firesign Theater


NT and Win2K FAQ .. cWashington WSH/ADSI/WMI site
MS WSH site ........... WSH FAQ Site
Wrox Press .............. Win32 Scripting Journal
eSolutions Services, LLC

The Surgeon General has determined that prolonged exposure to the Windows Script Host may be addictive to laboratory mice and codemonkeys
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform