係PC 上點 map S 記 NAS 自已個 home folder ?

想係 PC  map 自已個 home folder 做一個 network drive , 應該點搞法 ??


thx

[ 本帖最後由 wi111 於 2009-6-12 00:09 編輯 ]

冇人會咁連法 ??? 唔會瓜

TOP

TOP

如果係咁簡單就唔洗麻煩,各位大哥啦.

TOP

原帖由 wi111 於 2009-6-11 23:56 發表
想係 PC  map 自已個 home folder 做一個 network drive , 應該點搞法 ??


thx


確實有好多方法, 但我真係唔明你所指的 "home folder" 係指邊個.

如果你有心問你可以試下講 Detail 啲.

TOP

希望你自已領唔到, 我就用得好好

Option Explicit
Dim objNetwork
Dim strServer, strUser, strPwd
Dim strRemotePath()
Dim strDriveLetter()

Const iMapTotal = 1
Redim strRemotePath(iMapTotal)
Redim strDriveLetter(iMapTotal)

Set objNetwork = CreateObject("WScript.Network")

' Set Server, Username and Password
strServer = "NAS"      ' Enter the name of your NAS drive
strUser = "user"  ' Enter your NAS username
strPwd = "password"     ' Enter you NAS password

' Define Drive Letters and Remote Path
strDriveLetter(0) = "P:"
strRemotePath(0) = "\\" & strServer & "\MP3"


' Check Server can be accessed, and if not loop until it can.
' (This allows the script to wait until Wireless connections is established and Firewall is running)
Dim objPing, objRetStatus
Dim Ping

Ping = False
Do while Ping = False
    set objPing = GetObject("winmgmts:{impersonationLevel=impersonate}").ExecQuery _
          ("select * from Win32_PingStatus where address = '" & strServer & "'")

    For Each objRetStatus in objPing
        If IsNull(objRetStatus.StatusCode) or objRetStatus.StatusCode <> 0 Then
            Ping = False
        Else
            Ping = True
        End if
    Next
Loop

' Maps Drives
Dim iCnt
For icnt = 0 to iMapTotal -1
    objNetwork.MapNetworkDrive strDriveLetter(iCnt), strRemotePath(iCnt),,strUser,strPwd
Next

Wscript.Quit


[ 本帖最後由 yiufey 於 2009-6-15 00:41 編輯 ]

TOP

http://forum.synology.com/wiki/index.php/Mapping_a_Network_Drive

[ 本帖最後由 tkop 於 2009-6-15 00:42 編輯 ]

TOP

原帖由 wi111 於 2009-6-14 23:42 發表
如果係咁簡單就唔洗麻煩,各位大哥啦.

......

TOP