
无盘符
只是一个标记,功能不多,例如不能被设备上其它工程访问到
占的通信流量少,如果只是简单的文件传输,可以用这个
有盘符
相当于本地的磁盘
占的通信流量多
也有说 https://www.cnblogs.com/MrZivChu/p/network.html
网络位置是针对的是广域网!
是用来打开网站、FTP站点或者网络位置
网络驱动器是针对的是局域网!
"映射网络驱动器" 的意思是将局域网中的某个目录映射成本地驱动器号,就是说把网络上其他机器的共享的文件夹映射自己机器上的一个磁盘,这样可以提高访问时间。
"映射网络驱动器"是实现磁盘共享的一种方法,具体来说就是利用局域网将自己的数据保存在另外一台电脑上或者把另外一台电脑里的文件虚拟到自己的机器上。
把远端共享资源映射到本地后,在"我的电脑"中多了一个盘符,就像自己的电脑上多了一个磁盘,可以很方便进行操作.(如"创建一个文件""复制""粘贴"等)。等效于在"网上邻居"看到共享文件或磁盘,自己可以在权限范围内进行操作。
在网络中用户可能经常需要访问某一个或几个特定的网络共享资源,若每次通过网上邻居依次打开,比较麻烦,这时用记可以使用“映射网络驱动器”功能,将该网络共享资源映射为网络驱动器,再次访问时,只需双击该网络驱动器图标即可。
具体操作:
添加一个网络位置
在磁盘资源管理器空白位置右击“添加一个网络位置”

...,按提示下一步就中可以 。
成功会在C:\Users\此处为自己的用户名\AppData\Roaming\Microsoft\Windows\Network Shortcuts文件夹下生成一个文件
映射网络驱动器
进入磁盘资源管理器窗口后,在工具栏下,找到并选择“映射网络驱动器”这一项,点击打开。进入映射网络驱动器创建窗口,先给要映射的网络驱动器配置一个盘符,选择“驱动器”这一项,在右侧,点击下拉框的倒三角按钮。在列出的盘符中,这些都是未使用的盘符,从中选一个,在默认情况下,默认为“Z”,那就用默认的吧,这个可以自已定义选择。
命令方法是:cmd执行:net use Y: http://domain/dav /user:用户名 /persistent:YES 密码
/persistent 表示保存映射,下次开机还在。
==================
比方说,我有100个用户,我需要为每个用户添加多个网络位置.它们不能是网络驱动器(例如Q :),因为某些用户已经映射了超过26个驱动器.
我希望使用批处理文件或VBS脚本来执行此操作.通过添加网络快捷方式,添加网络位置..
经过一些测试,网络位置是位于%AppData%\Microsoft\Windows\Network Shortcuts文件夹中的只读文件夹,其中包含两个文件:desktop.ini内容是文件夹的图标信息和target.lnk指向目标的快捷方式.
vbs脚本创建网络位置
%AppData%\Microsoft\Windows\Network Shortcuts 文件夹中创建一个快捷方式:
View Code
Option Explicit
Const ssfNETHOOD=&H13&
Dim fso, shell, shellApplication
Setfso=WScript.CreateObject("Scripting.FileSystemObject")
Setshell=WScript.CreateObject("WSCript.Shell")
SetshellApplication=WScript.CreateObject("Shell.Application")
Dim networkLocationsFolder
networkLocationsFolder=shellApplication.Namespace( ssfNETHOOD ).Self.Path
Withshell.CreateShortcut(fso.BuildPath( networkLocationsFolder,"Test PC22.lnk"))
.TargetPath="\\121.61.43.61@1013\DavWWWRoot\dav"
.WindowStyle=1
.IconLocation="shell32.dll, 9"
.Description="Access to Test computer drive"
.WorkingDirectory=""
.Save
EndWith
View Code
OptionExplicit
FunctionCreateNetworkLocation( networkLocationName, networkLocationTarget )
ConstssfNETHOOD =&H13&
ConstfsATTRIBUTES_READONLY =1
ConstfsATTRIBUTES_HIDDEN =2
ConstfsATTRIBUTES_SYSTEM =4
CreateNetworkLocation =False
' Instantiate needed components
Dimfso, shell, shellApplication
Setfso = WScript.CreateObject("Scripting.FileSystemObject")
Setshell = WScript.CreateObject("WScript.Shell")
SetshellApplication = WScript.CreateObject("Shell.Application")
' Locate where NetworkLocations are stored
DimnethoodFolderPath, networkLocationFolder, networkLocationFolderPath
nethoodFolderPath = shellApplication.Namespace( ssfNETHOOD ).Self.Path
' Create the folder for our NetworkLocation and set its attributes
networkLocationFolderPath = fso.BuildPath( nethoodFolderPath, networkLocationName )
Iffso.FolderExists( networkLocationFolderPath )Then
ExitFunction
EndIf
SetnetworkLocationFolder = fso.CreateFolder( networkLocationFolderPath )
networkLocationFolder.Attributes = fsATTRIBUTES_READONLY
' Write the desktop.ini inside our NetworkLocation folder and change its attributes
DimdesktopINIFilePath
desktopINIFilePath = fso.BuildPath( networkLocationFolderPath,"desktop.ini")
Withfso.CreateTextFile(desktopINIFilePath)
.Write"[.ShellClassInfo]"& vbCrlf & _
"CLSID2={0AFACED1-E828-11D1-9187-B532F1E9575D}"& vbCrlf & _
"Flags=2"& vbCrlf
.Close
EndWith
Withfso.GetFile( desktopINIFilePath )
.Attributes = fsATTRIBUTES_HIDDEN + fsATTRIBUTES_SYSTEM
EndWith
' Create the shortcut to the target of our NetworkLocation
DimtargetLink
targetLink = fso.BuildPath( networkLocationFolderPath,"target.lnk")
Withshell.CreateShortcut( targetLink )
.TargetPath = networkLocationTarget
.Save
EndWith
' Done
CreateNetworkLocation =True
EndFunction
CreateNetworkLocation"Tests","\\192.168.1.2\c$"
网络凭证带来的危害是很大的,尤其对于一些不懂计算机和网络的人来说。
给别人开完共享后一定要在别人的计算机上删除网络凭证(net use * /del)