Modify ↓
Opened 11 years ago
Closed 11 years ago
#2454 closed Bug (Works For Me)
if WMI Obj need "Join",au3 crashed.
Reported by: | thesnoW | Owned by: | |
---|---|---|---|
Milestone: | Component: | AutoIt | |
Version: | 3.3.9.19 | Severity: | None |
Keywords: | Cc: |
Description
the 2rd round work on old version
the 1rd round will crash with not object.
_NetworkAdapterInfo() Func _NetworkAdapterInfo() Local $colItems = "" Local $objWMIService Local $NetworkAdapterGateway = "" $objWMIService = ObjGet("winmgmts:\\localhost\root\CIMV2") $colItems = $objWMIService.ExecQuery("SELECT * FROM Win32_NetworkAdapterConfiguration WHERE IPEnabled != 0", "WQL", 0x10 + 0x20) Local $colItem2 = $objWMIService.ExecQuery('SELECT * FROM Win32_NetworkAdapter WHERE NetConnectionStatus >0', "WQL", 0x10 + 0x20) If IsObj($colItems) Then For $objItem In $colItems ;1RD ;~ If IsObj($objItem.DefaultIPGateway) Then FOR $Element IN $objItem.DefaultIPGateway $NetworkAdapterGateway= $Element MsgBox(32,"",$NetworkAdapterGateway) NEXT ;~ EndIf ;2RD MsgBox(32,"",$NetworkAdapterGateway(0)) Next EndIf EndFunc ;==>_NetworkAdapterInfo
VBS version:
strDefaultIPGateway = Join(objItem.DefaultIPGateway, ",")
Attachments (0)
Change History (2)
comment:1 Changed 11 years ago by anonymous
comment:2 Changed 11 years ago by Jon
- Resolution set to Works For Me
- Status changed from new to closed
Guidelines for posting comments:
- You cannot re-open a ticket but you may still leave a comment if you have additional information to add.
- In-depth discussions should take place on the forum.
For more information see the full version of the ticket guidelines here.
Note: See
TracTickets for help on using
tickets.
This is not a bug. AutoIt has other methods. Here's an example: