Jump to content

Recommended Posts

Posted

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/

Capture.PNG

Capture2.PNG

Posted
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

Posted
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

Posted
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

Posted

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

 

Posted (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 by jdelaney
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.
Posted
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.

Posted
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.

Posted
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.

Posted (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 by Earthshine

My resources are limited. You must ask the right questions

 

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...