Jump to content
Sign in to follow this  
iceberg

Map Drive

Recommended Posts

iceberg

hi there!

can someone kindly assist me with this? why doesn't this work?

DriveMapAdd("Z:", "\\servername\" & @UserName & "id")

the actual mapping will be as follows:

\\servername\usernameid

thanks.

Edited by iceberg

mouse not found....scroll any mouse to continue.

Share this post


Link to post
Share on other sites
AutoChris

hi there!

can someone kindly assist me with this? why doesn't this work?

DriveMapAdd("Z:", "\\servername\" & @UserName & "id")

the actual mapping will be as follows:

\\servername\usernameid

thanks.

<{POST_SNAPBACK}>

It is hard to tell what is wrong from your line of code; everything looks okay. Try adding a little bit to your code:

$map = DriveMapAdd("Z:", "\\servername\" & @UserName & "id")
If $map = 0 Then MsgBox (0, "Error Number", @error)

This will tell you what the actual error is, or even if there is an error.

Share this post


Link to post
Share on other sites
iceberg

Hi,

thanks for the replies.

Error Number = 1

Holger : no typo error. Confirmed!


mouse not found....scroll any mouse to continue.

Share this post


Link to post
Share on other sites
AutoChris

Hi,

thanks for the replies.

Error Number = 1

Holger : no typo error. Confirmed!

<{POST_SNAPBACK}>

The fact that you received an error means something is not correct in your path. Keep in mind that @Username is the user name of the person logged on to that computer. So if SerialKiller was the user name then the path would be...?

\\Servername\SerialKillerid

Not knowing how you map things in your company, it is hard to troubleshoot exactly why you are getting the error. I am not sure why you would have an "id" after the user name, but we do some "not quite normal" things at my company too.

Edit: Other questions....

Are those directories (with the "id") shared? Does the local user have rights to the directory being mapped?

Edited by SerialKiller

Share this post


Link to post
Share on other sites
iceberg

thanks for the reply SerialKiller.

now I know where I went wrong....the server name was in correct.

thanks alot!


mouse not found....scroll any mouse to continue.

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  

×