
Maelstorm
Members-
Posts
14 -
Joined
-
Last visited
Profile Information
-
Location
United States
-
Interests
Electronics<br />Robotics<br />Communications<br />Computer Hardware<br />Computer Software<br />Computer Programming<br />Firmware Development<br />Embedded Application Development<br />Chemistry<br />Physics<br />Astronomy<br />Science & Technology<br />
Maelstorm's Achievements

Seeker (1/7)
0
Reputation
-
Strange COM object problem
Maelstorm replied to Maelstorm's topic in AutoIt General Help and Support
That makes no sense. Two objects, both dealing with networking, one has a problem and the other doesn't. Look at my first post. I included VBScript code and that code does work. I get the data from the COM object. It failed on 3.1.1.122 beta as well. This is looking more and more like some kind of weird bug. -
Strange COM object problem
Maelstorm replied to Maelstorm's topic in AutoIt General Help and Support
Now that is a very good question. I'll go look at that right now. [EDIT] I think you mean $objNetworkConfig.length as that's the one where the problem is. I insert code to try and see the value of this property, and I get the following error: The code now looks like this: dim $objWMIService dim $objNetworkConfig dim $objNetwork dim $objCfg dim $strComputer dim $strAssemble dim $a $objNetwork = ObjCreate("WScript.Network") $strComputer = $objNetwork.ComputerName $objWMIService = ObjGet("winmgmts:\\" & "." & "\root\cimv2") if @error <> 0 then exit(1) $objNetworkConfig = $objWMIService.ExecQuery("Select * from Win32_NetworkAdapterConfig") if @error <> 0 then exit(1) $a = $objNetworkConfig.length msgbox(0, "Debug", "Object Length: " & $a) for $objCfg in $objNetworkConfig $strAssemble = "" $strAssemble = $strAssemble & "Index: " & $objCfg.Index & @CRLF $strAssemble = $strAssemble & "Settings ID: " & $objCfg.SettingID & @CRLF $strAssemble = $strAssemble & "IP Address: " & $objCfg.IPAddress & @CRLF $strAssemble = $strAssemble & "Subnet Mask: " & $objCfg.IPSubnet & @CRLF $strAssemble = $strAssemble & "Gateway: " & $objCfg.DefaultIPGateway & @CRLF msgbox(0, "Network Adapter Configuration", $strAssemble) next msgbox(0, "Debug", "Done") exit(0) -
How do I pin a program to Start Menu
Maelstorm replied to Dougiefresh's topic in AutoIt General Help and Support
I have a write up here. Granted, this is for a Windows XP unattended install though, the actual format is in binary, and I haven't really cracked the code yet. One other thing...Microsoft does NOT want software vendors to stuff pinned items onto the start menu. They want the user to do it themselves, which probably explains why they did it this way. So for the moment, that's the best way of doing it. -
Consider the following code: dim $objWMIService dim $objNetworkConfig dim $objNetwork dim $objCfg dim $strComputer dim $strAssemble $objNetwork = ObjCreate("WScript.Network") $strComputer = $objNetwork.ComputerName $objWMIService = ObjGet("winmgmts:\\" & $strComputer & "\root\cimv2") if @error <> 0 then exit(1) $objNetworkConfig = $objWMIService.ExecQuery("Select * from Win32_NetworkAdapterConfig") if @error <> 0 then exit(1) for $objCfg in $objNetworkConfig $strAssemble = "" $strAssemble = $strAssemble & "Index: " & $objCfg.Index & @CRLF $strAssemble = $strAssemble & "Settings ID: " & $objCfg.SettingID & @CRLF $strAssemble = $strAssemble & "IP Address: " & $objCfg.IPAddress & @CRLF $strAssemble = $strAssemble & "Subnet Mask: " & $objCfg.IPSubnet & @CRLF $strAssemble = $strAssemble & "Gateway: " & $objCfg.DefaultIPGateway & @CRLF msgbox(0, "Network Adapter Configuration", $strAssemble) next msgbox(0, "Debug", "Done") exit(0) The problem is that the for loop does not execute. I'm not sure why either. The "Done" msgbox does display, so the code is not exiting before the loop. The docs releate to one possible problem though. "If the expression is an Object collection with no elements, the loop will be skipped and the Variable will contain an empty string." If that is the case, then why is $objNetworkConfig empty? I get data on that com object using VBScript. Below is the SAME code with a similar COM object that works: dim $objWMIService dim $objNetworkAdapter dim $objNetwork dim $objNet dim $strComputer dim $strAssemble $objNetwork = ObjCreate("WScript.Network") $strComputer = $objNetwork.ComputerName $objWMIService = ObjGet("winmgmts:\\" & $strComputer & "\root\cimv2") if @error <> 0 then exit(1) $objNetworkAdapter = $objWMIService.ExecQuery("Select * from Win32_NetworkAdapter") if @error <> 0 then exit(1) for $objNet in $objNetworkAdapter $strAssemble = "" $strAssemble = $strAssemble & "Name: " & $objNet.Name & @CRLF $strAssemble = $strAssemble & "Description: " & $objNet.Description & @CRLF $strAssemble = $strAssemble & "Type: " & $objNet.AdapterType & @CRLF $strAssemble = $strAssemble & "Connection Name: " & $objNet.NetConnectionID & @CRLF $strAssemble = $strAssemble & "PnP Device ID: " & $objNet.PNPDeviceID & @CRLF $strAssemble = $strAssemble & "MAC Address: " & $objNet.MACAddress & @CRLF $strAssemble = $strAssemble & "Index: " & $objNet.Index & @CRLF msgbox(0, "Network Adapter Configuration", $strAssemble) next msgbox(0, "Debug", "Done") exit(0) Practically the same code. The only difference being variable names and the COM object that is being referenced. Any ideas as to what is causing this? Could this be a AutoIT bug of some sort? VBScript code that works: On Error Resume Next strComputer = "." Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\CIMV2") Set colItems = objWMIService.ExecQuery("SELECT * FROM Win32_NetworkAdapterConfiguration") For Each objItem in colItems strAssemble = "" strAssemble = strAssemble & "ArpAlwaysSourceRoute: " & objItem.ArpAlwaysSourceRoute & vbNewLine strAssemble = strAssemble & "ArpUseEtherSNAP: " & objItem.ArpUseEtherSNAP & vbNewLine strAssemble = strAssemble & "Caption: " & objItem.Caption & vbNewLine strAssemble = strAssemble & "DatabasePath: " & objItem.DatabasePath & vbNewLine strAssemble = strAssemble & "DeadGWDetectEnabled: " & objItem.DeadGWDetectEnabled & vbNewLine strDefaultIPGateway = Join(objItem.DefaultIPGateway, ",") strAssemble = strAssemble & "DefaultIPGateway: " & strDefaultIPGateway & vbNewLine strAssemble = strAssemble & "DefaultTOS: " & objItem.DefaultTOS & vbNewLine strAssemble = strAssemble & "DefaultTTL: " & objItem.DefaultTTL & vbNewLine strAssemble = strAssemble & "Description: " & objItem.Description & vbNewLine strAssemble = strAssemble & "DHCPEnabled: " & objItem.DHCPEnabled & vbNewLine strAssemble = strAssemble & "DHCPLeaseExpires: " & objItem.DHCPLeaseExpires & vbNewLine strAssemble = strAssemble & "DHCPLeaseObtained: " & objItem.DHCPLeaseObtained & vbNewLine strAssemble = strAssemble & "DHCPServer: " & objItem.DHCPServer & vbNewLine strAssemble = strAssemble & "DNSDomain: " & objItem.DNSDomain & vbNewLine strDNSDomainSuffixSearchOrder = Join(objItem.DNSDomainSuffixSearchOrder, ",") strAssemble = strAssemble & "DNSDomainSuffixSearchOrder: " & strDNSDomainSuffixSearchOrder & vbNewLine strAssemble = strAssemble & "DNSEnabledForWINSResolution: " & objItem.DNSEnabledForWINSResolution & vbNewLine strAssemble = strAssemble & "DNSHostName: " & objItem.DNSHostName & vbNewLine strDNSServerSearchOrder = Join(objItem.DNSServerSearchOrder, ",") strAssemble = strAssemble & "DNSServerSearchOrder: " & strDNSServerSearchOrder & vbNewLine strAssemble = strAssemble & "DomainDNSRegistrationEnabled: " & objItem.DomainDNSRegistrationEnabled & vbNewLine strAssemble = strAssemble & "ForwardBufferMemory: " & objItem.ForwardBufferMemory & vbNewLine strAssemble = strAssemble & "FullDNSRegistrationEnabled: " & objItem.FullDNSRegistrationEnabled & vbNewLine strGatewayCostMetric = Join(objItem.GatewayCostMetric, ",") strAssemble = strAssemble & "GatewayCostMetric: " & strGatewayCostMetric & vbNewLine strAssemble = strAssemble & "IGMPLevel: " & objItem.IGMPLevel & vbNewLine strAssemble = strAssemble & "Index: " & objItem.Index & vbNewLine strIPAddress = Join(objItem.IPAddress, ",") strAssemble = strAssemble & "IPAddress: " & strIPAddress & vbNewLine strAssemble = strAssemble & "IPConnectionMetric: " & objItem.IPConnectionMetric & vbNewLine strAssemble = strAssemble & "IPEnabled: " & objItem.IPEnabled & vbNewLine strAssemble = strAssemble & "IPFilterSecurityEnabled: " & objItem.IPFilterSecurityEnabled & vbNewLine strAssemble = strAssemble & "IPPortSecurityEnabled: " & objItem.IPPortSecurityEnabled & vbNewLine strIPSecPermitIPProtocols = Join(objItem.IPSecPermitIPProtocols, ",") strAssemble = strAssemble & "IPSecPermitIPProtocols: " & strIPSecPermitIPProtocols & vbNewLine strIPSecPermitTCPPorts = Join(objItem.IPSecPermitTCPPorts, ",") strAssemble = strAssemble & "IPSecPermitTCPPorts: " & strIPSecPermitTCPPorts & vbNewLine strIPSecPermitUDPPorts = Join(objItem.IPSecPermitUDPPorts, ",") strAssemble = strAssemble & "IPSecPermitUDPPorts: " & strIPSecPermitUDPPorts & vbNewLine strIPSubnet = Join(objItem.IPSubnet, ",") strAssemble = strAssemble & "IPSubnet: " & strIPSubnet & vbNewLine strAssemble = strAssemble & "IPUseZeroBroadcast: " & objItem.IPUseZeroBroadcast & vbNewLine strAssemble = strAssemble & "IPXAddress: " & objItem.IPXAddress & vbNewLine strAssemble = strAssemble & "IPXEnabled: " & objItem.IPXEnabled & vbNewLine strIPXFrameType = Join(objItem.IPXFrameType, ",") strAssemble = strAssemble & "IPXFrameType: " & strIPXFrameType & vbNewLine strAssemble = strAssemble & "IPXMediaType: " & objItem.IPXMediaType & vbNewLine strIPXNetworkNumber = Join(objItem.IPXNetworkNumber, ",") strAssemble = strAssemble & "IPXNetworkNumber: " & strIPXNetworkNumber & vbNewLine strAssemble = strAssemble & "IPXVirtualNetNumber: " & objItem.IPXVirtualNetNumber & vbNewLine strAssemble = strAssemble & "KeepAliveInterval: " & objItem.KeepAliveInterval & vbNewLine strAssemble = strAssemble & "KeepAliveTime: " & objItem.KeepAliveTime & vbNewLine strAssemble = strAssemble & "MACAddress: " & objItem.MACAddress & vbNewLine strAssemble = strAssemble & "MTU: " & objItem.MTU & vbNewLine strAssemble = strAssemble & "NumForwardPackets: " & objItem.NumForwardPackets & vbNewLine strAssemble = strAssemble & "PMTUBHDetectEnabled: " & objItem.PMTUBHDetectEnabled & vbNewLine strAssemble = strAssemble & "PMTUDiscoveryEnabled: " & objItem.PMTUDiscoveryEnabled & vbNewLine strAssemble = strAssemble & "ServiceName: " & objItem.ServiceName & vbNewLine strAssemble = strAssemble & "SettingID: " & objItem.SettingID & vbNewLine strAssemble = strAssemble & "TcpipNetbiosOptions: " & objItem.TcpipNetbiosOptions & vbNewLine strAssemble = strAssemble & "TcpMaxConnectRetransmissions: " & objItem.TcpMaxConnectRetransmissions & vbNewLine strAssemble = strAssemble & "TcpMaxDataRetransmissions: " & objItem.TcpMaxDataRetransmissions & vbNewLine strAssemble = strAssemble & "TcpNumConnections: " & objItem.TcpNumConnections & vbNewLine strAssemble = strAssemble & "TcpUseRFC1122UrgentPointer: " & objItem.TcpUseRFC1122UrgentPointer & vbNewLine strAssemble = strAssemble & "TcpWindowSize: " & objItem.TcpWindowSize & vbNewLine strAssemble = strAssemble & "WINSEnableLMHostsLookup: " & objItem.WINSEnableLMHostsLookup & vbNewLine strAssemble = strAssemble & "WINSHostLookupFile: " & objItem.WINSHostLookupFile & vbNewLine strAssemble = strAssemble & "WINSPrimaryServer: " & objItem.WINSPrimaryServer & vbNewLine strAssemble = strAssemble & "WINSScopeID: " & objItem.WINSScopeID & vbNewLine strAssemble = strAssemble & "WINSSecondaryServer: " & objItem.WINSSecondaryServer & vbNewLine Wscript.Echo strAssemble Next
-
[Report] But Report in v3.1.1.109 (Beta)
Maelstorm replied to Maelstorm's topic in AutoIt General Help and Support
There's just one thing that I have to say... IT WAS A JOKE -
[Report] But Report in v3.1.1.109 (Beta)
Maelstorm replied to Maelstorm's topic in AutoIt General Help and Support
The topic should read "Bug Report" not "But Report". Typos... -
[Report] But Report in v3.1.1.109 (Beta)
Maelstorm posted a topic in AutoIt General Help and Support
Bug Report Software Release Version: v3.1.1.109 (Beta) In the documentation for function GUICtrlCreateButton, it says that you can have $BS_PUSHBUTTON for the style option. When the code runs, it can't find it. I checked GUIConstants.au3 and found there is a $BS_DEFPUSHBUTTON defined. End Report I think I'll blame GreenMachine here. He was the one who suggested using the Beta version due to the wealth of function calls available. Granted, no software is perfect, but this does come close. Later. -
Documentation for offline use
Maelstorm replied to Maelstorm's topic in AutoIt General Help and Support
Considering that you have the same handle, I thought you were. If you are interested in what MSFN is, head on over to http://unattended.msfn.org for a look see. That site, and it's forums are dedicated to unattended Windows installations. I have to admit, I had my doubts about it, but now that I have a working installation set, I'll never go back to the old way again. -
Documentation for offline use
Maelstorm replied to Maelstorm's topic in AutoIt General Help and Support
I'll take your word for it, but I really haven't needed any beyond what the 3.1.1 release contains in my installation scripts, and I've written some pretty complicated stuff. If you want info on Notepad++, this is the site: http://notepad-plus.sourceforge.net/uk/site.htm. BTW, are you the same greenmachine that maintains the Windows XP Powerpacker tool and haunts the MSFN forums? -
Documentation for offline use
Maelstorm replied to Maelstorm's topic in AutoIt General Help and Support
I'm not too much into beta software, especially when you are building an unattended install in a production environment. And for my text editing, I use Notepad++. -
Documentation for offline use
Maelstorm replied to Maelstorm's topic in AutoIt General Help and Support
I was not aware that there was an included help file. Thanks for pointing that out. And I downloaded the PDF tutorial and I'm looking it over, but it seems to be pretty basic. I am a programmer by nature, and I'm quite adept on writing cmd scripts and vbscript programs. The syntax is a little different, but it's not hard. It's just learning the function calls and macros that are available with the language. -
Learning to Script with AutoIt 3
Maelstorm replied to LxP's topic in AutoIt General Help and Support
Interesting thread. I downloaded the PDF and I'm looking it over now. -
Is there a PDF file or other document that can be downloaded that contains the AutoIT v3 documentation? Thanks.