BruceCopperField Posted December 24, 2009 Share Posted December 24, 2009 I am not quite familiar with Windows security. If I started a few processes under another user id using RunAs in Windows menu, would I be still able to see the Windows created by them and send keystroke/mouseclick to them? Would the security model be the same for XP and Vista? Link to comment Share on other sites More sharing options...
danielkza Posted December 24, 2009 Share Posted December 24, 2009 (edited) IIRC, you can't send keystrokes to windows belonging to processes running with higher privileges than your script's. That will almost never happen in XP since pretty much everything runs with admin. access. The same does not happen if you have UAC enable in Vista/7.Obs: Just tested it with two simple scripts in Windows 7, and it works like that: the window is visible, can be activated, but does not accept keystrokes from lower-privileged processes. They're completely ignored.#RequireAdmin #include <GUIConstantsEx.au3> GUICreate("AU3-RUNAS-HIGH",500,500) GUICtrlCreateEdit("",4,4,492,492) GUISetState(@SW_SHOW) While GUIGetMsg() <> $GUI_EVENT_CLOSE WEnd;#RequireAdmin Global $hWnd = WinWait("AU3-RUNAS-HIGH") If $hWnd Then WinActivate($hWnd) Send("asdw") EndIf Edited December 24, 2009 by danielkza 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