WSH@Workshop 
HOME > WSHリファレンス > WshNetwork オブジェクト > MapNetworkDrive

MapNetworkDrive (WshNetwork オブジェクト)

object.MapNetworkDrive(local, remote, [profile], [user], [password])

引数

object
WshNetwork の名前を指定します。
lcoal
割り当てるドライブ名を指定します。
remote
共有ドライブの UNC 名 (\\xxx\yyy) を指定します。
profile
マッピング情報を現在のユーザー プロファイルに格納する場合は、Trueを指定します。(省略可能)
user
ユーザー名を指定します。(省略可能)
password
パスワードを指定します。(省略可能)

解説

共有ネットワーク ドライブをコンピュータ システムに追加します。

使用例

Set WshNetwork = WScript.CreateObject("WScript.Network")
WshNetwork.MapNetworkDrive "E:", "\\Server1\Public"

関連項目

ComputerNameUserDomainUserNameAddWindowsPrinterConnectionAddPrinterConnectionEnumNetworkDrivesEnumPrinterConnectionRemoveNetworkDrive
RemovePrinterConnectionSetDefaultPrinter



WSHリファレンス

FileSystemObject オブジェクト
Drive オブジェクト
Folder オブジェクト
File オブジェクト
Drives コレクション
Folders コレクション
Files コレクション


Copyright (C) 2006-2008 WSH@Workshop All rights reserved.