meke tiyana waradda mokakda.(NetWORKING)

romero2005

Well-known member
  • Sep 13, 2006
    4,116
    191
    63
    Lankawe
    Map a network drive to the User name

    Option Explicit
    Dim objNetwork
    Dim strDriveLetter, strRemotePath, strUserName
    strDriveLetter = "J:"
    strRemotePath = "\\Server\home"

    ' Purpose of script to create a network object. (objNetwork)
    ' Then to apply the MapNetworkDrive method. Result J: drive
    Set objNetwork = WScript.CreateObject("WScript.Network")
    ' Here is where we extract the UserName
    strUserName = objNetwork.UserName
    objNetwork.MapNetworkDrive strDriveLetter, strRemotePath _
    & "\" & strUserName

    ' Extra code just to add a message box
    WScript.Echo " Launch Abel Training, Welcome to ABEL Training Service check: "& strDriveLetter
    WScript.Quit


    Mage Server name eka "Server" Shared file eka "home" THis is for my final Project.