persistant drive mappings

Home Forums Scripting General Scripting persistant drive mappings

Viewing 1 post (of 1 total)
  • Author
    Posts
  • Avatar
    krayzie
    Member
    #154665

    hey guys what im trying to do is create persistant drive mappings for laptop users who VPN in …

    here is my vbs script


    On Error Resume Next

    Set objSysInfo = CreateObject(“ADSystemInfo”)
    Set objNetwork = CreateObject(“Wscript.Network”)

    strUserPath = “LDAP://” & objSysInfo.UserName
    Set objUser = GetObject(strUserPath)

    For Each strGroup in objUser.MemberOf
    strGroupPath = “LDAP://” & strGroup
    Set objGroup = GetObject(strGroupPath)
    strGroupName = objGroup.CN

    Rem Default Mapping for all users
    Rem objNetwork.MapNetworkDrive “G:”, “\serverdata”

    Select Case strGroupName

    Rem Map share1
    Case “Share1”
    objNetwork.MapNetworkDrive “q:”, “\servershare”

    Rem Map share2
    Case “share2”
    objNetwork.MapNetworkDrive “r:”, “\servershare”

    Rem MAP share3
    Case “share3”
    objNetwork.MapNetworkDrive “j:”, “\servershare”

    Rem MAP share4
    Case “share4”
    objNetwork.MapNetworkDrive “n:”, “\servershare”

    End Select
    Next
    Rem Quit the Script
    wscript.quit



    how do you add /persistant:yes???

    thanks guys

Viewing 1 post (of 1 total)

You must be logged in to reply to this topic.