Вверх ↑
Ответов: 578
Рейтинг: 14
#1: 2010-08-05 10:40:52 ЛС | профиль | цитата
немного переделал и почему то не работает :-?
Add(VBJScript,9051083,525,273)
{
WorkPoints=#6:doWork|
EventPoints=#7:onEvent|8:onEvent2|
DataPoints=#3:adr|
Script=#27:Function doWork(data,index)|10:hh=sys.adr|27:Const ADS_SCOPE_SUBTREE = 2|0:|61: Set objConnection = CreateObject("ADODB.Connection")|57: Set objCommand = CreateObject("ADODB.Command")|48: objConnection.Provider = "ADsDSOObject"|55: objConnection.Open "Active Directory Provider"|0:|56: Set objCOmmand.ActiveConnection = objConnection|35: objCommand.CommandText = _|53: "Select Name, Location from 'LDAP://adr' " _|43: & "Where objectClass='computer'" |50: objCommand.Properties("Page Size") = 1000|66: objCommand.Properties("Searchscope") = ADS_SCOPE_SUBTREE |46: Set objRecordSet = objCommand.Execute|31: objRecordSet.MoveFirst|0:|34: Do Until objRecordSet.EOF|77: Sys.onEvent "Computer Name: " & objRecordSet.Fields("Name").Value|33: objRecordSet.MoveNext|13: Loop|9: |26: Sys.onEvent2 ""|11: |12:End Function|
UseName=0
link(onEvent,7100787:doAdd,[])
link(adr,10952968:Text,[])
}
Add(MainForm,6006308,385,273)
{
Height=383
}
Add(Button,12779393,469,273)
{
Left=5
Top=30
Width=380
link(onClick,9051083:doWork,[])
}
Add(Edit,10952968,525,217)
{
Left=5
Top=5
Width=380
Text="OU=Computers,OU=Петропавловск,DC=corp,DC=atfbank,DC=kz"
}
Add(ListBox,7100787,581,273)
{
Left=5
Top=55
Width=380
Height=295
}



карма: 0

0
файлы: 1code_19833.txt [1.5KB] [120]