>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...