标题: vbs删除默认共享 [打印本页]
作者: youxi01 时间: 2007-11-5 20:03 标题: vbs删除默认共享
- '////作者: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
复制代码
欢迎光临 批处理之家 (http://www.bathome.net/) |
Powered by Discuz! 7.2 |