Announcement

Collapse
No announcement yet.

persistant drive mappings

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

  • persistant drive mappings

    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:", "\\server\data"


    Select Case strGroupName


    Rem Map share1
    Case "Share1"
    objNetwork.MapNetworkDrive "q:", "\\server\share"

    Rem Map share2
    Case "share2"
    objNetwork.MapNetworkDrive "r:", "\\server\share"

    Rem MAP share3
    Case "share3"
    objNetwork.MapNetworkDrive "j:", "\\server\share"

    Rem MAP share4
    Case "share4"
    objNetwork.MapNetworkDrive "n:", "\\server\share"



    End Select
    Next
    Rem Quit the Script
    wscript.quit

    -----

    how do you add /persistant:yes???

    thanks guys

  • #2
    Re: persistant drive mappings

    Originally posted by krayzie View Post
    hey guys what im trying to do is create persistant drive mappings for laptop users who VPN in ...

    here is my vbs script
    <...>

    how do you add /persistant:yes???

    thanks guys
    Similar Thread and solution here

    /Rems

    This posting is provided "AS IS" with no warranties, and confers no rights.

    __________________

    ** Remember to give credit where credit's due **
    and leave Reputation Points for meaningful posts

    Comment


    • #3
      Re: persistant drive mappings

      Originally posted by Rems View Post

      thank you rems this worked great!

      Comment

      Working...
      X