阅读222 返回首页    go 微软 go windows


如何用批处理添加网络快捷方式?

我有一个网络共享文件夹,需要分享给多个用户,想快捷的设置

配置如下

:On Error Resume Next 

Sub bat
echo off

echo '>nul & set Lnk=\\192.168.1.2\工作组
echo '>nul & set Name=工作组
 
echo '>nul & start wscript -e:vbs "%~f0" "%Lnk%" "%Name%"
Exit Sub
End Sub
  
Set WshShell = WScript.CreateObject("WScript.Shell")
strDesktop = WshShell.SpecialFolders("Desktop")
set oShellLink = WshShell.CreateShortcut(strDesktop + "\" + WScript.Arguments(1) + ".lnk")
oShellLink.TargetPath = WScript.Arguments(0)
oShellLink.Save

创建快捷方式成功,但是每次需要手动输入共享文件夹的用户名和密码。请问如何把用户名和密码这段内容也加入进去,不明白呀~~



您好!

 

我们社区提供关于Windows家庭版及专业版日常使用和升级更新故障的技术支持,

关于您编辑批处理命令的问题,您可以通过网络搜索或自学相关的代码编辑;

 

或前往微软TechNet论坛发帖获取帮助,

 

会有专门的工程师为您进行解答。

https://social.technet.microsoft.com/Forums/zh-cn/home



最后更新:2018-01-04 15:04:29

  上一篇:go 最近经常蓝屏
  下一篇:go win7的搜索服务不可用