动网论坛,站长建站首选,国内使用量最多的论坛软件 动网论坛官方技术讨论区 站长工具 申请属于您自己的免费论坛
首页 | 新闻资讯 | 网站运营 | 网络编程 | 数据库 | 服务器 | 网页设计 | 图像媒体 | 网络应用 | 搜索优化 | 资源下载 | 动网主机 | DVBOX
    本站内  互联网 ASP论坛  ASP.Net论坛  PHP论坛
   Asp → 阅读文章

 取得服务器上用户组列表脚本之VBS版

作者:沧海笑一声 来源:chinaasp.com 
阅读 数 599 人次 , 2001-2-14 

'groups.vbs
'时间:2001.2.5
'版本:1.0
'作者:沧海笑一声
'其它:此脚本原作者写于2000年初,沧海用过后觉得不是很好用.
'它原来的显示方式是wsh的方法,往往要多屏显示,而且不能保存结果
'我将之改成IE显示的方法,用起来方便些.:)

On Error Resume Next
'dim wshell
dim ie,doc

set ie = createobject("internetexplorer.application")
ie.navigate "about:blank"
ie.visible = true

set doc = ie.document

CRLF=CHR(13)+CHR(10)
DomainString =inputbox("请输入一个域名:")
msgbox "域名是:"&DomainString

write "<Table border=1 cellpadding=4 width=90% bgcolor=ffffcc><TR Align=Center><TD valign=top> <B><Font
Size=5 Color=Blue>"&UCASE(DomainString)&"内的所有组的列表</B></Font></td></tr></table>"
doc.title=UCASE(DomainString) & " - 组"

Set DomainObj = GetObject("WinNT://" & DomainString)
tmp= DomainObj.MinPasswordLength 'verify this is a valid domain
if err.number<>0 then
write "<Font Color=Red> There was an error connecting to " & domainname & "</Font>!<br>"
set ie=Nothing
wscript.quit
end if

DomainObj.Filter = Array("group")
strInfo="<Table border=0 cellpadding=5><TR><TD><B><Font Size=3>组名</Font></B></TD><TD><B><Font Size=3>描述
</Font></B></TD></TR>"
ie.StatusText="正在收集信息,请稍候......"
For Each GroupObj In DomainObj
If GroupObj.Class = "Group" Then
strInfo=strInfo&"<TR><TD><B><Font Size=3>"&GroupObj.Name&"</Font></B></TD><TD><B><Font
Size=3>"&GroupObj.Description&"</Font></B></TD></TR>"
End If
Next
set DomainObj = Nothing
set GroupObj = Nothing
strInfo=strInfo & "</Table>"
write strInfo & "<br>"

write "<font size=1><I>" & Now & "</I></Font>"

set ie=Nothing
set doc=Nothing
wscript.quit

'******************
sub write(str)
doc.body.insertAdjacentHTML "beforeend", str
end sub
  

 
 收藏本文  打印本文  论坛讨论  关闭窗口
· 上一篇:取得服务器上用户组列表的脚本之asp版.(匿名用户权限即可完成)
· 下一篇:送大家一个小脚本,非常实用。:)
· 如何让你的ASP运行于非Windows平台 - 4
· 利用xmlhttp和adodb.stream加缓存技术下载远程Web文件
· ASP 3.0高级编程(三十四)
· 浅谈MsChart在ASP中的应用
· ASP通用分页类


关于本站 | 联系我们 | 业务合作 | 客户案例 | 诚聘英才 | 广告合作 | 收藏本站
海口动网先锋网络科技有限公司版权所有
Copyright © 2000 - 2006 Cndw.Com
中华人民共和国电信与信息服务业务经营许可证编号 琼 ICP 020077