ok i figured out how to find the button handle in the child window. but i am still unable to get the button to click. The code works fine on another window, just not the UAC window
|
|
I am trying to find the handle of the child window for the Yes button in the User Account Control window so i can click it. This window has a structure with a few child windows with the same name.
There are multiple CtrNotifySink with its own Button child window or other child windows. How do i search thru the different CtrNotifySink window to find the one that contain the Yes button so i can send a click to it?Code:Dim hwnd As IntPtr = FindWindow(Nothing, "User Account Control") Dim hwnd2 As IntPtr = FindWindowEx(hwnd, 0, "DirectUIHWND", vbNullString) Dim hwnd3 As IntPtr = FindWindowEx(hwnd2, 0, "CtrlNotifySink", vbNullString) Dim hwnd4 As IntPtr = FindWindowEx(hwnd3, 0, "Button", "&Yes")
I do need to find it before i can send a click, right? because i try just sending it to the main window with sendmessage and nothing happen.
I even try sending it directly to the handle found by spy++ of the yes button with bm click but nothing happen
Last edited by Zexor; 03-20-2010 at 5:10 AM.
ok i figured out how to find the button handle in the child window. but i am still unable to get the button to click. The code works fine on another window, just not the UAC window
Last edited by Zexor; 03-20-2010 at 2:27 PM.
I'm pretty darn sure its blocked, it it wasn't it would make UAC 100% useless...
Why in the world do you need to do this for a legit application?![]()
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks