Announcement

Collapse
No announcement yet.

VB logon script

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

  • VB logon script

    I have this logon script based on Group membership. The first share mapped is a personal share, but I have some users who do not have a personal share. When theis users logon they do not get the other shares. How do I wrap the first share in a if-statment?
    Attached Files

  • #2
    Something like this should work

    Code:
    Set wshNetwork = CreateObject("WScript.Network")
    Set objFSO = CreateObject("Scripting.FileSystemObject")
    
    If objFSO.FolderExists("\\server\" & wshNetwork.UserName) Then
     wshNetwork.MapNetworkDrive "u:","\\server\" & wshNetwork.UserName
    Else
     Wscript.Echo "Folder does not exist?"
    End If
    https://technet.microsoft.com/en-us/.../ee198738.aspx

    Comment


    • #3
      Looks ok, but I need to run through the rest of the script and no giving any messages about the missing folder.

      Comment


      • #4
        This should work. PetriLogon.txt

        Comment


        • #5
          Thanks. Works.

          Comment

          Working...
          X