Announcement

Collapse
No announcement yet.

Logon Scripts

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Logon Scripts

    Hi,

    I use VB script for the processing of all the mapped drives for users in the domain.

    To mapp to the users home drive I use the following line.

    WSHNetwork.MapNetworkDrive "H:", "\\server01\users\" & UserString,True

    I would like to map one level down from here and cannot find the syntax to do this. So for example I would like the J: to be mapped to \\server01\users\<username>\Email

    Can anyone help?

    Thanks

  • #2
    Re: Logon Scripts

    Originally posted by brian873 View Post
    Hi,

    To mapp to the users home drive I use the following line.

    WSHNetwork.MapNetworkDrive "H:", "\\server01\users\" & UserString,True

    I would like to map one level down from here and cannot find the syntax to do this. So for example I would like the J: to be mapped to \\server01\users\<username>\Email

    Can anyone help?

    Thanks
    Is/are the said folders shared?
    You can only map to a shared folder.
    Caesar's cipher - 3

    ZKHQ BRX HYHQWXDOOB GHFLSKHU WKLV BRX ZLOO UHDOLVH LW ZDV D ZDVWH RI WLPH!

    SFX JNRS FC U6 MNGR

    Comment


    • #3
      Re: Logon Scripts

      Hi thanks for the reply.

      The folder shared is

      \\server01\home

      under thats are all the usernames

      \\server01\home\user1
      \\server01\home\user2
      ....

      I would like to go one level down from this while still using the & UserString varable to provide the username part of the string.

      \\server01\home\<username>\email

      thanks

      brian

      Comment


      • #4
        Re: Logon Scripts

        I have found a solution to this....

        If anyone can improve on it please post an answer...please not this is not the full logon script only the parts i have changed to get this working.

        Code:
        Dim UserString1, 
        
        'Grab the user name
        UserString = WSHNetwork.UserName
        UserString1 = UserString & "\email"
        
        'Map home folder
        WSHNetwork.MapNetworkDrive "H:", "\\merlegla01\home\" & UserString,True
        
        'Map a level down from home folder
        WSHNetwork.MapNetworkDrive "I:", "\\merlegla01\home\" & UserString1,True
        Last edited by biggles77; 30th November 2009, 12:28.

        Comment

        Working...
        X