三
06
06
windows自动映射网络驱动器
今天需要用把共享目录映射成网络驱动器,研究了一下,记录在此:
创建一个批处理文件,写入以下内容:
@echo off
net use h: \\x.x.x.x\xxx password /user:username /persistent:yes
net config server /autodisconnect:65535
第一行是不屏显的意思,第二行h:为网络驱动器盘符,\\x.x.x.x\xxx被映射主机的ip地址及被映射文件夹名称,password为登陆密码,/user:username其中username为登陆用户名,/persistent:yes是否保持连接。
net config server /autodisconnect:65535设置网络超时时间,最大65535,单位:分钟。
使用注册表编辑器增加默认超时期限:
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\lanmanserver\parameters
B、 在右窗格中,单击值 autodisconnect,将内容修改为:ffffffff
There are no comments.