No announcement yet.

VB logon Scripting with two file servers

  • Filter
  • Time
  • Show
Clear All
new posts

  • VB logon Scripting with two file servers

    I know I have read it somewhere about the following logon scripting:

    If the user is from A to L use this file server
    If the user is from L to Z use another file server.

    but I cannot find it anymore. Is there anybody who could direct me to VBprogram that could do this job.


  • #2
    Re: VB logon Scripting with two file servers

    The things you need to Google then are....

    1. how to get the username of the current user using VBScript
    2. once you have that string, how to get a substring from it - in your case, the first character
    3. once you have that character then you have two choices; the easiest implementation would be to use if statements or select case statements, a cleaner but more difficult implementation would be to use regular expressions - in either case though, the code you would control execution of would be the code that chooses which server hostname to use in the path to map *
    * assuming you're mapping a share to a drive letter
    Gareth Howells

    BSc (Hons), MBCS, MCP, MCDST, ICCE

    Any advice is given in good faith and without warranty.

    Please give reputation points if somebody has helped you.

    "For by now I could have stretched out my hand and struck you and your people with a plague that would have wiped you off the Earth." (Exodus 9:15) - I could kill you with my thumb.

    "Everything that lives and moves will be food for you." (Genesis 9:3) - For every animal you don't eat, I'm going to eat three.