Thanks for Reply,
im still have the problen that i don`t understand how to revice information from Enterprise mibs.
At this time am using snmpget like this:
Run(@ComSpec & " /c snmpget -v1 " & $sections[$i] & ' public ' &".1.3.6.1.2.1.1.1.0", @TempDir,"",6)
Then i read it with stdoutread. At last i'am closing the pid, but the problem is that is very havy to the cpu. Another Problem is that the handles will not close until i close the main exe.
Now i testet some examples like:
$wbemFlagReturnImmediately = 0x10
$wbemFlagForwardOnly = 0x20
$objLocator = ObjCreate("wbemscripting.swbemlocator")
$objServices = $objLocator.connectServer("", "root/snmp/localhost")
$objServices.security_.privileges.AddAsString("SeSecurityPrivilege")
$objSet = $objServices.ExecQuery ("SELECT * FROM SNMP_NET_DEVICE_123 WHERE hdwr_idx>1" , "WQL", $wbemFlagReturnImmediately + $wbemFlagForwardOnly)
for $obj in $objset
ConsoleWrite( "do whatever ..." & @LF)
Next
;---------------------- SNMP Action ------------------------
$wbemFlagReturnImmediately = 0x10
$wbemFlagForwardOnly = 0x20
$objLocator = ObjCreate("wbemscripting.swbemlocator")
$objServices = $objLocator.connectServer("", "root/snmp/localhost")
$objServices.security_.privileges.AddAsString("SeSecurityPrivilege")
$obj= $objServices.Get("SNMP_NET_DEVICE_123=@")
$obj.deviceLocation = "40/5073"
$obj.put_
_________________________________________________________________________
Or:
#include <GUIConstants.au3>
$IP = "127.0.0.1"
$hwnd = GUICreate ("MIB Data Viewer", 800, 600)
$edit1 = GUICtrlCreateEdit ("", 0, 0, 800, 600)
GUICtrlSetBkColor (-1, 0x000000)
GUICtrlSetColor ($edit1, 0xFFFFFF)
UDPStartup()
$socket = UDPBind($IP, 161)
If @error = 1 Then MsgBox(0, "error", "Incorrect IP")
If @error = 2 Then MsgBox(0, "error", "Incorrect port")
MsgBox(0, "error", @error)
GUISetState (@SW_SHOW)
While 1
$msg = GUIGetMsg ()
$data = UDPRecv($socket, 256)
If $data <> "" Then
GUICtrlSetData ($edit1, GUICtrlRead ($edit1) & @CRLF & _
"------------------------------------------------------------------------------------------" & _
@CRLF & $data)
EndIf
Select
Case $msg = $GUI_EVENT_CLOSE
Exit
EndSelect
WEnd
Func OnAutoItExit()
UDPCloseSocket($socket)
UDPShutdown()
EndFunc
But the problem is that nothing works and i don`t know how to get the information that i want like the value of: .1.3.6.1.2.1.1.1.0
I`m searching since 4 weeks an nowbody has an Idea how to to it
Thanks @all