gperez Posted February 4, 2014 Share Posted February 4, 2014 Hi. I´ve some problems with WMI functions. for Example ( generated by Autoit Scriptomatic tool): expandcollapse popup; Generated by AutoIt Scriptomatic $wbemFlagReturnImmediately = 0x10 $wbemFlagForwardOnly = 0x20 $colItems = "" $strComputer = "localhost" $Output="" $Output = $Output & "Computer: " & $strComputer & @CRLF $Output = $Output & "==========================================" & @CRLF $objWMIService = ObjGet("winmgmts:\\" & $strComputer & "\") $colItems = $objWMIService.ExecQuery("SELECT * FROM Win32_NetworkAdapterConfiguration", "WQL", _ $wbemFlagReturnImmediately + $wbemFlagForwardOnly) If IsObj($colItems) then For $objItem In $colItems $Output = $Output & "ArpAlwaysSourceRoute: " & $objItem.ArpAlwaysSourceRoute & @CRLF $Output = $Output & "ArpUseEtherSNAP: " & $objItem.ArpUseEtherSNAP & @CRLF $Output = $Output & "Caption: " & $objItem.Caption & @CRLF $Output = $Output & "DatabasePath: " & $objItem.DatabasePath & @CRLF $Output = $Output & "DeadGWDetectEnabled: " & $objItem.DeadGWDetectEnabled & @CRLF $strDefaultIPGateway = $objItem.DefaultIPGateway(0) $Output = $Output & "DefaultIPGateway: " & $strDefaultIPGateway & @CRLF $Output = $Output & "DefaultTOS: " & $objItem.DefaultTOS & @CRLF $Output = $Output & "DefaultTTL: " & $objItem.DefaultTTL & @CRLF $Output = $Output & "Description: " & $objItem.Description & @CRLF $Output = $Output & "DHCPEnabled: " & $objItem.DHCPEnabled & @CRLF $Output = $Output & "DHCPLeaseExpires: " & WMIDateStringToDate($objItem.DHCPLeaseExpires) & @CRLF $Output = $Output & "DHCPLeaseObtained: " & WMIDateStringToDate($objItem.DHCPLeaseObtained) & @CRLF $Output = $Output & "DHCPServer: " & $objItem.DHCPServer & @CRLF $Output = $Output & "DNSDomain: " & $objItem.DNSDomain & @CRLF $strDNSDomainSuffixSearchOrder = $objItem.DNSDomainSuffixSearchOrder(0) $Output = $Output & "DNSDomainSuffixSearchOrder: " & $strDNSDomainSuffixSearchOrder & @CRLF $Output = $Output & "DNSEnabledForWINSResolution: " & $objItem.DNSEnabledForWINSResolution & @CRLF $Output = $Output & "DNSHostName: " & $objItem.DNSHostName & @CRLF $strDNSServerSearchOrder = $objItem.DNSServerSearchOrder(0) $Output = $Output & "DNSServerSearchOrder: " & $strDNSServerSearchOrder & @CRLF $Output = $Output & "DomainDNSRegistrationEnabled: " & $objItem.DomainDNSRegistrationEnabled & @CRLF $Output = $Output & "ForwardBufferMemory: " & $objItem.ForwardBufferMemory & @CRLF $Output = $Output & "FullDNSRegistrationEnabled: " & $objItem.FullDNSRegistrationEnabled & @CRLF $strGatewayCostMetric = $objItem.GatewayCostMetric(0) $Output = $Output & "GatewayCostMetric: " & $strGatewayCostMetric & @CRLF $Output = $Output & "IGMPLevel: " & $objItem.IGMPLevel & @CRLF $Output = $Output & "Index: " & $objItem.Index & @CRLF $Output = $Output & "InterfaceIndex: " & $objItem.InterfaceIndex & @CRLF $strIPAddress = $objItem.IPAddress(0) $Output = $Output & "IPAddress: " & $strIPAddress & @CRLF $Output = $Output & "IPConnectionMetric: " & $objItem.IPConnectionMetric & @CRLF $Output = $Output & "IPEnabled: " & $objItem.IPEnabled & @CRLF $Output = $Output & "IPFilterSecurityEnabled: " & $objItem.IPFilterSecurityEnabled & @CRLF $Output = $Output & "IPPortSecurityEnabled: " & $objItem.IPPortSecurityEnabled & @CRLF $strIPSecPermitIPProtocols = $objItem.IPSecPermitIPProtocols(0) $Output = $Output & "IPSecPermitIPProtocols: " & $strIPSecPermitIPProtocols & @CRLF $strIPSecPermitTCPPorts = $objItem.IPSecPermitTCPPorts(0) $Output = $Output & "IPSecPermitTCPPorts: " & $strIPSecPermitTCPPorts & @CRLF $strIPSecPermitUDPPorts = $objItem.IPSecPermitUDPPorts(0) $Output = $Output & "IPSecPermitUDPPorts: " & $strIPSecPermitUDPPorts & @CRLF $strIPSubnet = $objItem.IPSubnet(0) $Output = $Output & "IPSubnet: " & $strIPSubnet & @CRLF $Output = $Output & "IPUseZeroBroadcast: " & $objItem.IPUseZeroBroadcast & @CRLF $Output = $Output & "IPXAddress: " & $objItem.IPXAddress & @CRLF $Output = $Output & "IPXEnabled: " & $objItem.IPXEnabled & @CRLF $strIPXFrameType = $objItem.IPXFrameType(0) $Output = $Output & "IPXFrameType: " & $strIPXFrameType & @CRLF $Output = $Output & "IPXMediaType: " & $objItem.IPXMediaType & @CRLF $strIPXNetworkNumber = $objItem.IPXNetworkNumber(0) $Output = $Output & "IPXNetworkNumber: " & $strIPXNetworkNumber & @CRLF $Output = $Output & "IPXVirtualNetNumber: " & $objItem.IPXVirtualNetNumber & @CRLF $Output = $Output & "KeepAliveInterval: " & $objItem.KeepAliveInterval & @CRLF $Output = $Output & "KeepAliveTime: " & $objItem.KeepAliveTime & @CRLF $Output = $Output & "MACAddress: " & $objItem.MACAddress & @CRLF $Output = $Output & "MTU: " & $objItem.MTU & @CRLF $Output = $Output & "NumForwardPackets: " & $objItem.NumForwardPackets & @CRLF $Output = $Output & "PMTUBHDetectEnabled: " & $objItem.PMTUBHDetectEnabled & @CRLF $Output = $Output & "PMTUDiscoveryEnabled: " & $objItem.PMTUDiscoveryEnabled & @CRLF $Output = $Output & "ServiceName: " & $objItem.ServiceName & @CRLF $Output = $Output & "SettingID: " & $objItem.SettingID & @CRLF $Output = $Output & "TcpipNetbiosOptions: " & $objItem.TcpipNetbiosOptions & @CRLF $Output = $Output & "TcpMaxConnectRetransmissions: " & $objItem.TcpMaxConnectRetransmissions & @CRLF $Output = $Output & "TcpMaxDataRetransmissions: " & $objItem.TcpMaxDataRetransmissions & @CRLF $Output = $Output & "TcpNumConnections: " & $objItem.TcpNumConnections & @CRLF $Output = $Output & "TcpUseRFC1122UrgentPointer: " & $objItem.TcpUseRFC1122UrgentPointer & @CRLF $Output = $Output & "TcpWindowSize: " & $objItem.TcpWindowSize & @CRLF $Output = $Output & "WINSEnableLMHostsLookup: " & $objItem.WINSEnableLMHostsLookup & @CRLF $Output = $Output & "WINSHostLookupFile: " & $objItem.WINSHostLookupFile & @CRLF $Output = $Output & "WINSPrimaryServer: " & $objItem.WINSPrimaryServer & @CRLF $Output = $Output & "WINSScopeID: " & $objItem.WINSScopeID & @CRLF $Output = $Output & "WINSSecondaryServer: " & $objItem.WINSSecondaryServer & @CRLF if Msgbox(1,"WMI Output",$Output) = 2 then ExitLoop $Output="" Next Else Msgbox(0,"WMI Output","No WMI Objects Found for class: " & "Win32_NetworkAdapterConfiguration" ) Endif Func WMIDateStringToDate($dtmDate) Return (StringMid($dtmDate, 5, 2) & "/" & _ StringMid($dtmDate, 7, 2) & "/" & StringLeft($dtmDate, 4) _ & " " & StringMid($dtmDate, 9, 2) & ":" & StringMid($dtmDate, 11, 2) & ":" & StringMid($dtmDate,13, 2)) EndFunc when i run from Scite, i´ve this exit line, with no results: !(current date/time) AutoIt3.exe ended.rc:-1073741819 My OS is win 8.1 64Bits spanish , running autoit 3.3.10.2 32 bits for compatibility. In the old version (3.3.8.1) this script works fine ( in the same configuration). Any idea? Link to comment Share on other sites More sharing options...
water Posted February 4, 2014 Share Posted February 4, 2014 Try the latest AutoIt beta version 3.3.11.3. Here 3.3.10.2 crashed whereas 3.3.11.3 runs without problem. The problem is described in ticket #2613 My UDFs and Tutorials: Spoiler UDFs:Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsOutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - DownloadOutlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - WikiPowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - WikiTask Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs:Excel - Example Scripts - WikiWord - Wiki Tutorials:ADO - WikiWebDriver - Wiki Link to comment Share on other sites More sharing options...
gperez Posted February 4, 2014 Author Share Posted February 4, 2014 thanks! Link to comment Share on other sites More sharing options...
water Posted February 4, 2014 Share Posted February 4, 2014 My UDFs and Tutorials: Spoiler UDFs:Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsOutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - DownloadOutlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - WikiPowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - WikiTask Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs:Excel - Example Scripts - WikiWord - Wiki Tutorials:ADO - WikiWebDriver - Wiki Link to comment Share on other sites More sharing options...
demando Posted February 4, 2014 Share Posted February 4, 2014 (edited) Hi water thank you for this information. Is there any way to fix der Version 3.3.10.2 (File-Replace) because i have already tested with the version 3.3.10.2 Do you know when the Beta-Versin 3.3.11.3 wll be produktion release? Kind regard Edited February 4, 2014 by demando Link to comment Share on other sites More sharing options...
water Posted February 4, 2014 Share Posted February 4, 2014 I don't think the solution will be back-ported to 3.3.10.x Use 3.3.11.3 as it is the same as 3.3.10.2 incl. some error fixes. My UDFs and Tutorials: Spoiler UDFs:Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsOutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - DownloadOutlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - WikiPowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - WikiTask Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs:Excel - Example Scripts - WikiWord - Wiki Tutorials:ADO - WikiWebDriver - Wiki Link to comment Share on other sites More sharing options...
demando Posted February 4, 2014 Share Posted February 4, 2014 Hi water thank you very much for this information. Is the version 3.3.11.3. compatible with the Active Directory UDF Version 1.4 ? Kind regard demando Link to comment Share on other sites More sharing options...
water Posted February 4, 2014 Share Posted February 4, 2014 Yes. My UDFs and Tutorials: Spoiler UDFs:Active Directory (NEW 2022-02-19 - Version 1.6.1.0) - Download - General Help & Support - Example Scripts - WikiExcelChart (2017-07-21 - Version 0.4.0.1) - Download - General Help & Support - Example ScriptsOutlookEX (2021-11-16 - Version 1.7.0.0) - Download - General Help & Support - Example Scripts - WikiOutlookEX_GUI (2021-04-13 - Version 1.4.0.0) - DownloadOutlook Tools (2019-07-22 - Version 0.6.0.0) - Download - General Help & Support - WikiPowerPoint (2021-08-31 - Version 1.5.0.0) - Download - General Help & Support - Example Scripts - WikiTask Scheduler (NEW 2022-07-28 - Version 1.6.0.1) - Download - General Help & Support - Wiki Standard UDFs:Excel - Example Scripts - WikiWord - Wiki Tutorials:ADO - WikiWebDriver - Wiki Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now