Jump to content
Sign in to follow this  

Key borad and Mouse controls are not working on "Windows security" window in Win -7

Recommended Posts

Hi all,

I am new to AutoIt. I am writing a script to check the "Windows Security" alert in win -7.

I have to check a box ( Always allow software from xxx) and click "install". I have the below script for that :

The hotkeys are Alt + a and Alt + i

WinActivate("Windows Security")

if WinActive("Windows Security") then






The window gets highlighted, but the controls are not passed.

So I tried to use Controlclick instead of Send. Here is the script:

winwait("Windows Security")

if not WinActive("Windows Security") then winactivate("Windows Security")

WinWaitActive("Windows Security")

ControlClick("Windows Security","","DirectUIHWND1")


ControlClick("Windows Security","","Button1")



The first script works perfectly on Win2k8 machine. I am unable to understand the reason why it refuses to work on Win-7.

I am stuck on this since 3 days. Any help is appreciated.

Thank you.

Share this post

Link to post
Share on other sites


Welcome to the AutoIt forum. :)

I have Vista, not Win 7, so you may wish to ignore this. ;)

I would be appalled if you could automate the "Always allow software from xxx" checkbox, or indeed any other item in the Security GUI. :P

After all, what use is a security window that can be bypassed that easily? Even using #RequireAdmin will probably not permit it - and a good thing too in my opinion. o:)

Sorry to sound so negative. I will try harder for your next question. ;)


Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:


ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area


Share this post

Link to post
Share on other sites

I understand. But when I installed a Broadcom Bluetooth driver in a W2k8 machine , the script worked fine.

I guess W2K8 and Win-7 are mostly similar in security perspective.

Share this post

Link to post
Share on other sites


I encounter the same issue in win-7 system when runing send("!a") and send("!i") on "Windows Security" window. The script send hotkeys can't work in win-7. Do you have any solution about this issues?


Share this post

Link to post
Share on other sites


I have add #requireadmin in the script. But it doesn't work. The send("!a") and send("!I") script have no effect.


Share this post

Link to post
Share on other sites

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
Sign in to follow this  

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...