TheLug Posted December 5, 2018 Share Posted December 5, 2018 Window Screen Grab Attached, Window Info Screen Grad Attached. Code with multiple things trying below. Nothing will interact with this window. Is this a problem because it is a windows security window? Pulling my hair out over here. #RequireAdmin #include <AutoItConstants.au3> Sleep (5000) MouseMove (940, 450, 50) Sleep (5000) WinActivate ("Windows Security") ControlClick('[CLASS:#32770]', 'Windows Security', '[CLASS:Button; INSTANCE:1]') ControlClick ("Windows Security", "", "","left",1,940,450) MouseClick ($MOUSE_CLICK_LEFT) MouseClick ($MOUSE_CLICK_LEFT) Also asked for help in this post but moved to this since nothing is working. https://www.autoitscript.com/forum/topic/196877-rundll32-silent-help/ Link to comment Share on other sites More sharing options...
FrancescoDiMuro Posted December 5, 2018 Share Posted December 5, 2018 @TheLug Have you already tried with PnPUtil? Click here to see my signature: Spoiler ALWAYS GOOD TO READ: Forum Rules Forum Etiquette Link to comment Share on other sites More sharing options...
TheLug Posted December 5, 2018 Author Share Posted December 5, 2018 16 minutes ago, FrancescoDiMuro said: @TheLug Have you already tried with PnPUtil? just tried still need to click the Install button Link to comment Share on other sites More sharing options...
AdamUL Posted December 5, 2018 Share Posted December 5, 2018 (edited) Did you use the /install switch for PnPUtil? What command line did you run? Adam Edited December 5, 2018 by AdamUL Link to comment Share on other sites More sharing options...
TheLug Posted December 5, 2018 Author Share Posted December 5, 2018 32 minutes ago, AdamUL said: Did you use the /install switch for PnPUtil? What command line did you run? Adam PnPutil.exe -i -a c:\Users\user1\Desktop\RF_162\Source\RightFax\Drivers\rfps.inf Link to comment Share on other sites More sharing options...
AdamUL Posted December 5, 2018 Share Posted December 5, 2018 Did you run this with AutoIt's Run or RunWait command? If so, are you running the script as 32 or 64 bit? Adam Link to comment Share on other sites More sharing options...
TheLug Posted December 5, 2018 Author Share Posted December 5, 2018 36 minutes ago, AdamUL said: Did you use the /install switch for PnPUtil? What command line did you run? Adam /install & /add-driver i guess are not valid in mine tells me to use -i & -a Link to comment Share on other sites More sharing options...
TheLug Posted December 5, 2018 Author Share Posted December 5, 2018 Just now, AdamUL said: Did you run this with AutoIt's Run or RunWait command? If so, are you running the script as 32 or 64 bit? Adam I tried even running it manually in CMD. I also ran with auto it and used runwait comspec, and tried x86 & x64 Link to comment Share on other sites More sharing options...
FrancescoDiMuro Posted December 5, 2018 Share Posted December 5, 2018 9 minutes ago, TheLug said: PnPutil.exe -i -a c:\Users\user1\Desktop\RF_162\Source\RightFax\Drivers\rfps.inf What does this command do (or don't do) in this case? Click here to see my signature: Spoiler ALWAYS GOOD TO READ: Forum Rules Forum Etiquette Link to comment Share on other sites More sharing options...
AdamUL Posted December 5, 2018 Share Posted December 5, 2018 Is this driver part of an installation package? I did some googling on "open text printers driver install silent," and I found quite a few things. I'm not sure what you are using. You may be able to install the printer through the installation package. Adam Link to comment Share on other sites More sharing options...
jdelaney Posted December 6, 2018 Share Posted December 6, 2018 (edited) I bet you may interact with the window and it's controls if you include: #RequireAdmin oops, there go my reading comprehension skills. Disregard. Try this instead: WinActivate returns a handle. Use that handle to the controlclick. You can also do a ConsoleOutput of that handle variable to make sure that you properly grabbed the window. A second note: you are looking for specific text in your first ControlClick function that doesn't exist in your window. A third note: when you use control click, the coordiantes only relate to INSIDE the control. If you click outside of the bounds of the control, no click will occur (that I'm aware of)...I can double check this in a bit...confirmed that doing a controlclick outside the bounds of the control will not actually click anything. So I would do this: #RequireAdmin $h = WinWait("Windows Security") ConsoleWrite("winwait handle=" & $h & @CRLF) $c = ControlGetHandle($h,"","Button1") ConsoleWrite("ControlGetHandle handle=" & $c & @CRLF) ControlClick($h,"",$c) Notice how I put in some error handling, so I can compare the handles against the spy tool to ensure that what I'm doing is working properly. Edited December 6, 2018 by jdelaney FrancescoDiMuro 1 IEbyXPATH-Grab IE DOM objects by XPATH IEscriptRecord-Makings of an IE script recorder ExcelFromXML-Create Excel docs without excel installed GetAllWindowControls-Output all control data on a given window. Link to comment Share on other sites More sharing options...
TheLug Posted December 6, 2018 Author Share Posted December 6, 2018 16 hours ago, FrancescoDiMuro said: What does this command do (or don't do) in this case? It trys to install the driver. But it pops up the screen shot asking for you to click install / don't install. Link to comment Share on other sites More sharing options...
TheLug Posted December 6, 2018 Author Share Posted December 6, 2018 16 hours ago, AdamUL said: Is this driver part of an installation package? I did some googling on "open text printers driver install silent," and I found quite a few things. I'm not sure what you are using. You may be able to install the printer through the installation package. Adam Yes it is part of the rightfax package for digital faxing. I am using the package and getting this. IF i try to do it manually i get the same pop up. Link to comment Share on other sites More sharing options...
TheLug Posted December 6, 2018 Author Share Posted December 6, 2018 14 hours ago, jdelaney said: I bet you may interact with the window and it's controls if you include: #RequireAdmin oops, there go my reading comprehension skills. Disregard. Try this instead: WinActivate returns a handle. Use that handle to the controlclick. You can also do a ConsoleOutput of that handle variable to make sure that you properly grabbed the window. A second note: you are looking for specific text in your first ControlClick function that doesn't exist in your window. A third note: when you use control click, the coordiantes only relate to INSIDE the control. If you click outside of the bounds of the control, no click will occur (that I'm aware of)...I can double check this in a bit...confirmed that doing a controlclick outside the bounds of the control will not actually click anything. So I would do this: #RequireAdmin $h = WinWait("Windows Security") ConsoleWrite("winwait handle=" & $h & @CRLF) $c = ControlGetHandle($h,"","Button1") ConsoleWrite("ControlGetHandle handle=" & $c & @CRLF) ControlClick($h,"",$c) Notice how I put in some error handling, so I can compare the handles against the spy tool to ensure that what I'm doing is working properly. Thanks! Will try this now. Link to comment Share on other sites More sharing options...
Earthshine Posted December 6, 2018 Share Posted December 6, 2018 (edited) you can't automate the Windows Security forms for a reason. I am not sure they will allow a program to auto install a driver nowadays. good luck though Edited December 6, 2018 by Earthshine My resources are limited. You must ask the right questions Link to comment Share on other sites More sharing options...
junkew Posted December 10, 2018 Share Posted December 10, 2018 Uia should be able to handle these windows. Many examples when you google. http://blog.majcica.com/2015/04/02/manage-with-codedui-sites-that-are-using-windows-authentication/ FAQ 31 How to click some elements, FAQ 40 Test automation with AutoIt, Multithreading CLR .NET Powershell CMDLets 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