Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
COM objects????
Message
From
17/08/2000 12:47:19
 
 
To
17/08/2000 12:29:13
General information
Forum:
Visual FoxPro
Category:
Other
Title:
Miscellaneous
Thread ID:
00405553
Message ID:
00406202
Views:
21
>We have two sets of requirements:
>
>Currently, I have a method that gets a list of the drives already mapped and checks to see if a drive is already mapped to the Server/vol needed.
> If not, it attaches to the Server using a generic userid/password that has rights ONLY to the directory needed, and then maps the next available drive letter to the server/vol needed. Otherwise, it just maps the next available drive letter.
>
>Then, on exit, deletes the drive mapping and (if not attached before running the app) logs out of the server.
>
>The second requirement is to be able to verify a password on the server for a specific userid. We have a couple of apps that were written outside of TDH that does this.
>
>If I can get some examples or actual code that will do these, that would be outstanding. Not to mention that I would be GREATLY appreciative.
>

You can use the sample code from my NETRESOURCE class in the Files section to Map drives and specify a user id and password if for some reason you can't use the WSH Wscript.Network. AFA validating users against servers, I'd suggest using ADSI; see the web sites in my sig block for reference material. If you have any ASP experience at all, Wrox Press publixhes a book "ADSI ASP Programmer's Reference" which covers ADSI pretty well, but it's ADSI/VBScript focused (IOW, the samples involving code manipulation are VBScript not VFP).

>
>>>Currently we use it for basic "Are they already attached to the server?" question, attaching to specific servers and drive mappings.
>>
>>If you could be more specific here, we might be able to lay out some code that will do what you want. The API functions to map a drive are not all that bad...
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
Reply
Map
View

Click here to load this message in the networking platform