none
Map Network Drive of W2k8 from XP with VBscript RRS feed

  • 一般討論

  • Option Explicit
    Dim objNetwork
    Dim strDriveLetter, strRemotePath, strUserName

    strDriveLetter = "M:"
    strRemotePath = "\\File-serverA.abc.com\home\"

    Set objNetwork = WScript.CreateObject("WScript.Network")  

    strUserName = objNetwork.UserName
    objNetwork.MapNetworkDrive strDriveLetter, strRemotePath & strUserName


    Dim objNetwork1, objShell, strRemotePath1, strRemotePath2

    Dim strDriveLetter1, strDriveLetter2, strDriveExplore

    strDriveLetter1 = "N:"
    strDriveLetter2 = "O:"
    strRemotePath1 = "\\File-serverA.abc.com\group\

    strRemotePath2 = "\\File-serverA.abc.com\share\


    Set objNetwork1 = CreateObject("WScript.Network")

    objNetwork1.MapNetworkDrive strDriveLetter1, strRemotePath1

    objNetwork1.MapNetworkDrive strDriveLetter2, strRemotePath2

    -------------

    Line 35
    Char 1
    Error :The network name cannot be found
    COde 80070043
    Source: WSHNetwork.MapNetworkDrive

    ---------------

    I am unable to find out what's wrong on my Map Network LogonScript

    Please help

    Thanks

    • 已變更類型 Vincent Lin 2009年8月17日 上午 03:22
    2009年8月11日 上午 06:49

所有回覆

  • 假設在XP上面使用net use Z: \\File-ServerA.abc.com\group 的話可以連線嗎?
    如果可以的話系統本身應該是沒問題
    可能就是Script的撰寫有問題..就要到MSDN論壇去詢問


    年度軟體技術盛會微軟Tech.Days 9月22日全新登場, 您還在等什麼? 快報名就對了.


    2009年8月12日 上午 10:55