When normal ways doesn't work.vasili111 wrote:What is the reason for sending keys from Ring 0 ? Not detected by games or any other reason?
For example this one, the activeX control PassGuardCtrl. You can't send keys to it using the normal ways.
Code: Select all
#NoEnv
#SingleInstance Force
RunAsAdmin()
RegDLL()
Gui, Add, ActiveX, w400 h40 Border vpwdCtrl, {3A2C8BC3-5B68-4AE5-81D6-6DC378708F3E}
pwdCtrl.BackColor := 0xffffff
pwdCtrl.ForeColor := 0x318722
pwdCtrl.edittype := 1 ; 1=plain text, 2=password (default)
Gui, Show
Return
GuiClose:
UnRegDLL()
ExitApp
RunAsAdmin() {
If !A_IsAdmin {
Run *RunAs "%A_ScriptFullPath%" ; Requires v1.0.92.01+
ExitApp
}
}
RegDLL() {
try {
obj := ComObjCreate("{3A2C8BC3-5B68-4AE5-81D6-6DC378708F3E}")
} catch e {
if FileExist("PassGuardCtrl.dll")
RunWait, regsvr32 /s PassGuardCtrl.dll
else
throw, "PassGuardCtrl.dll is missing."
}
}
UnRegDLL() {
RunWait, regsvr32 /s /u PassGuardCtrl.dll
}