Jump to content
Sign in to follow this  
jguinch

DriveMapAdd and unknow error code

Recommended Posts

Hello,

I have a problem with DriveMapAdd function.

I use a script to map severals drives at Windows logon on a server.

When a user connects for the first time on the server, he musts change his password (Windows flag "user must change password at next logon").

So DriveMapAdd function cannot connect to the server. I don't know how to get the @error code corresponding to "user must change password at next logon".

The DriveMapAdd function sets @error at

1 = Undefined / Other error. @extended set with Windows API return

2 = Access to the remote share was denied

3 = The device is already assigned

4 = Invalid device name

5 = Invalid remote share

6 = Invalid password

Is there a way with @extended ? How can I use it ?

When I print @extended, it's value is 0.

Does anyone have an idea ?

Thanks

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...