Вверх ↑
Разработчик
Ответов: 26170
Рейтинг: 2127
#1: 2014-04-03 14:20:17 ЛС | профиль | цитата
В справке есть пример на VBS от IndigO

Add(MainForm,10920954,154,126)
{
Width=675
WindowsState=2
link(onCreate,3739609:doEvent1,[])
}
Add(VBJScript,4798378,238,140)
{
WorkPoints=#6:doEnum|
EventPoints=#6:onEnum|
Script=#23:Sub doWork(Data, Index)|18:strComputer = "." |74:Set objWMIService = GetObject("winmgmts:\" & strComputer & "ootCIMV2")|17:Select Case Index|30: Case "doEnum" |84: Set colItems = objWMIService.ExecQuery("SELECT * FROM Win32_DiskDrive",,48) |37: For Each objItem in colItems |182: sys.onEnum objItem.InterfaceType & "*" & objItem.Size & "*" & objItem.Index & "*" & objItem.Name & "*" & objItem.Model & "*" & objItem.Signature & "*" & objItem.MediaType|19: Next |10:End Select|8:End Sub |
UseName=0
link(onEnum,11705729:doAdd,[])
}
Add(StringTable,11705729,280,140)
{
Width=667
Height=273
Align=2
Columns=#13:InterfaceType|4:Size|5:Index|4:Name|5:Model|9:Signature|9:MediaType|
StrDelimiter="*"
}
Add(Hub,3739609,196,140)
{
OutCount=3
link(onEvent1,4798378:doEnum,[])
link(onEvent2,14251883:doEnum,[(224,153)(224,188)])
link(onEvent3,3749728:doEnum,[(224,160)(224,230)])
}
Add(VBJScript,14251883,238,182)
{
WorkPoints=#6:doEnum|
EventPoints=#6:onEnum|
Script=#23:Sub doWork(Data, Index)|18:strComputer = "." |74:Set objWMIService = GetObject("winmgmts:\" & strComputer & "ootCIMV2")|17:Select Case Index|30: Case "doEnum" |86: Set colItems = objWMIService.ExecQuery("SELECT * FROM Win32_LogicalDisk",,48) |37: For Each objItem in colItems |239: sys.onEnum objItem.Caption & "*" & objItem.DeviceID & "*" & objItem.Name & "*" & objItem.Size & "*" & objItem.FileSystem & "*" & objItem.Description & "*" & objItem.DriveType & "*" & objItem.MediaType & "*" & objItem.VolumeName|19: Next |10:End Select|8:End Sub |
UseName=0
link(onEnum,9869355:doAdd,[])
}
Add(VBJScript,3749728,238,224)
{
WorkPoints=#6:doEnum|
EventPoints=#6:onEnum|
Script=#23:Sub doWork(Data, Index)|18:strComputer = "." |74:Set objWMIService = GetObject("winmgmts:\" & strComputer & "ootCIMV2")|17:Select Case Index|30: Case "doEnum" |97: Set colItems = objWMIService.ExecQuery("SELECT * FROM Win32_LogicalDiskToPartition",,48) |37: For Each objItem in colItems |121: sys.onEnum EndingAddress & "*" & objItem.antecedent & "*" & objItem.dependent & "*" & objItem.StartingAddress|19: Next |10:End Select|8:End Sub |
UseName=0
link(onEnum,309455:doAdd,[])
}
Add(StringTable,309455,280,224)
{
Width=667
Height=273
Align=4
Columns=#13:EndingAddress|10:antecedent|9:dependent|15:StartingAddress|
StrDelimiter="*"
}
Add(StringTable,9869355,280,182)
{
Width=667
Height=273
Align=5
Columns=#7:Caption|8:DeviceID|4:Name|4:Size|10:FileSystem|11:Description|9:DriveType|9:MediaType|10:VolumeName|
StrDelimiter="*"
}

------------ Дoбавленo в 14.20:
217.24.189.52, твой пример выдает "Недопустимый знак" и не работает
карма: 22

0