Jump to content

Map Drive


iceberg
 Share

Recommended Posts

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.

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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
Link to comment
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
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...