- '////作者:youxi01@bbs.bathome.net
- '////很早期的作品;
- dim wsh,suc,err
- suc="成功删除下列共享:"
- err="以下共享删除失败:"
- set wsh=createobject("wscript.shell")
- set fso=createobject("scripting.filesystemobject")
- set dr=fso.drives
- for each d in dr
- delchk(d.driveletter)
- next
- delchk("ADMIN")
- delchk("IPC")
- function delchk(dshare)
- strreturn=wsh.run("net share " &dshare &"$ /del",false,1)
- if strreturn=2 then
- err=err & dshare& vbcrlf
- else
- suc=suc & dshare & vbcrlf
- end if
- end function
- wscript.echo err & suc
复制代码
|