
bratton
Members-
Posts
13 -
Joined
-
Last visited
bratton's Achievements

Seeker (1/7)
0
Reputation
-
Hello. Sorry it's taken me awhile to get back to this. I just wanted to provide an update that I appear to have found the root cause. This issue was only on the Dell M4700 so I decided to start disabling devices to see if there was some kind of driver conflict. As it turns out, as soon as i disabled the video driver, the script worked perfectly. I have no idea why the video driver would prevent AutoIT from enumerating WMI, but it is definitely causing the problem. The video card is a NVIDIA Quadro K100M. Driver version is 9.18.13.668 I'm going to upgrade the driver to see if that resolves the issue. Just thought I'd post this as an FYI in case anyone else encounters this issue.
-
This is the COM handler I'm using now, but I'll try yours to see if it generates anything more useful. Unfortunately, I had to give the system back to the user so I won't be able to test till tomorrow. I'll let you know in the morning if I make any progress. Thanks again for all the help so far. $oMyError = ObjEvent("AutoIt.Error","MyErrFunc") Func MyErrFunc() Msgbox(0,"AutoItCOM Test","We intercepted a COM Error !" & @CRLF & @CRLF & _ "err.description is: " & @TAB & $oMyError.description & @CRLF & _ "err.windescription:" & @TAB & $oMyError.windescription & @CRLF & _ "err.number is: " & @TAB & hex($oMyError.number,8) & @CRLF & _ "err.lastdllerror is: " & @TAB & $oMyError.lastdllerror & @CRLF & _ "err.scriptline is: " & @TAB & $oMyError.scriptline & @CRLF & _ "err.source is: " & @TAB & $oMyError.source & @CRLF & _ "err.helpfile is: " & @TAB & $oMyError.helpfile & @CRLF & _ "err.helpcontext is: " & @TAB & $oMyError.helpcontext _ ) Endfunc
-
I replaced WQL with Default and it still failed. Yeah, I was really surprised to see the vbscipt work when AutoIT was failing, but that's exactly what's happening. I'm using 3.3.8.1
-
Thanks kylomas. The script I have has run successfully on about 18,000 computers. It's just a handful that have this really strange issue. It's like there's some dependency for AutoIT that doesn't exist, or maybe some dll that is corrupt. I'm really stumped on this one.
-
Hi water, Thanks for the link. That's an awesome tool. Unfortunately, the code it gave me threw the same error. Hi boththose, I tired changing it to $strComputer = "localhost" but it still failed with the same error. I also changed it to winmgmts:.rootcimv2 but that also failed.
-
This is just an example of the issue I'm seeing. The issue is not specific to this namespace or class or object. Any call I make to WMI is failing with AutoIt, but works with vbscript.
-
Hello, I have a simple script that pulls the name of the logged on user from WMI. When I run it through AutoIT on some computers I'm getting the following error. Desc = Generic failure WinDesc = Variable is not of type 'Object' Source = SWbemServicesEx What's strange is that if I run the same code in a vbscpt it retuns the value successfully. AutoIT Code (throws the error) $strComputer = "." $objWMIService = ObjGet("winmgmts:\\" & $strComputer & "\root\cimv2") $colItems = $objWMIService.ExecQuery("Select * From Win32_ComputerSystem","WQL",48) For $objItem in $colItems MsgBox (0,"Username", $objItem.UserName) Next VBscript (returns the UserName") On Error Resume Next strComputer = "." Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2") Set colItems = objWMIService.ExecQuery("Select * from Win32_ComputerSystem",,48) For Each objItem in colItems Wscript.Echo "UserName: " & objItem.UserName Next Any idea why vbscript is working, but not AutoIT? I've found some similar posts about this error, but nothing that specifically described the issue I'm seeing. Thanks in advance for the help.
-
No Jos, No, I had not seen that. Looks promising though. I'll give it a shot. Thanks for the reply.
-
Hello, Need some help figuring out how to compare variables. Here's my example of a comparison that works: $var = "1.2.3" $var1 = "1.2.4" if $var < $var1 then msgbox (0,"", "True") The problem is, I need the operator to be a variable as well. I've been trying to use Exeucte(), but the problem is that it fails if there is more than one decimal in the string. For example: $var = "1.2.3" $var1 = "1.2.4" $operator = "<" $return = Execute ($var & $operator & $var1) msgbox (0,"", $return)
-
Hello, I have a pretty simple script that I need some help with. The problem is that I'm trying to get this script to stop executing without exiting when it encounters an error. If I run this as a compiled exe while connected to my domain, it works fine. If I'm disconnected from my domain, then I get my custom Error message (as expected). But I also get an AutoIt Error - "Line -1: Error: Error in expression." What I'm trying to do is suppress the Line -1 error and also allow the GUI stay active. If I add Exit to MyErrFunc, I no longer get the Line -1 error, but I loose my GUI as well. Any help would be greatly appreciated. Another way to force this script to fail is to change the line: $objUser = ObjGet("LDAP://" & $strUserDN) to $objUser = ObjGet("LDAP://" & $strUserDN & "error") CODE#include <guiconstants.au3> $oMyError = ObjEvent("AutoIt.Error","MyErrFunc") dim $szResults, $arrGroups GUICreate ("TEST", 300, 200) $btn = GUICtrlCreateButton("group membership", 10,10, 110, 28) GUISetState () While 1 $msg = GUIGetMsg() If $msg = $GUI_EVENT_CLOSE Then ExitLoop If $msg = $btn Then $objSysInfo = ObjCreate("ADSystemInfo") $strUserDN = $objSysInfo.UserName $objUser = ObjGet("LDAP://" & $strUserDN) $arrGroups = $objUser.GetEx("memberOf") For $strGroup In $arrGroups $szResults = $szResults & $strGroup & @CRLF Next MsgBox (0,"", $szResults) EndIf WEnd Func MyErrFunc() Sleep (1000) MsgBox (48,"TEST", "Error... ") SetError(1) Endfunc
-
Try adding adding #AutoIt3Wrapper_icon=your_icon.ico to your script. I was having the same problem and this worked for me.
-
Hello, I'm trying to use the following code to create a child gui, but when the child gui opens, I can't tab from one field to the next. If I change the code so that the child gui opens in a separate gui, tabbing works fine. Is there a better way for me to write this so that the child does not have to open in a separate gui and tabbing still works? I'm sure this is answered somewhere, but I just couldn't find it. If someone could point me in the right direction, I would greatly appreciate it. Thanks in advance for the help. CODE#include <GUIConstants.au3> $Main_GUI = GuiCreate("This is my GUI", 460, 300) GUISetState() $parent = GuiCreate('parent', 460, 300, 0, 0, $WS_CHILD,-1, $Main_GUI) $lbl = GUICtrlCreateLabel ("Main Gui.", 10, 15, 450,100) $btn1 = GUICtrlCreateButton ("child", 20, 120, 100, 40) $child1 = GuiCreate('child1', 460, 300,0,0, $WS_CHILD,-1, $Main_GUI) $childlbl = GUICtrlCreateLabel ("Child Gui.", 10, 15, 450,100) GUICtrlCreateLabel ("field1", 30, 110) $field = GUICtrlCreateInput ("",110, 105, 130, 20) GUICtrlCreateLabel ("field2", 30, 135) $field1 = GUICtrlCreateInput ("",110, 130, 130, 20) $submit = GUICtrlCreateButton ("Submit", 30, 235, 70, 30) $cancel = GUICtrlCreateButton ("Cancel", 120, 235, 70, 30) GUISetState(@SW_SHOW, $parent) GUISetState(@SW_HIDE, $child1) While 1 $msg = GUIGetMsg() Select Case $msg = $btn1 GUISetState(@SW_SHOW, $child1) GUISetState(@SW_HIDE, $parent) Case $msg = $cancel GUISetState(@SW_SHOW, $parent) GUISetState(@SW_HIDE, $child1) Case $msg = $GUI_EVENT_CLOSE Exit EndSelect WEnd