Instead of arbitrating a time to sleep with the hopes the app will be ready when it wakes up, you can use the SetFocus() in a While Loop. This will cause the script to wait for the window. Use a short sleep to save CPU rather than checking constantly for the window. If you arbitrate the sleep time and its too short, since you aren't testing $RC, the SendKeys() go into space. If you set the sleep too long, the user may think he/she needs to do input and make the wrong choice.
Example:
code:

While
$RC = SetFocus("Untitled - Notepad") <> 0
Sleep (1)
Loop
$RC = SendKeys("Hello World")


You may still need to tweak the sleep time as sometimes a window appears long before the input option you sendkey to is available.
>Also, why is the user seeing the install process?
You can't have it both ways. You need to choose one. Either setup an installer package that does a silent install or use SetFocus() and SendKeys(). You cannot send keys to a hidden window.
_________________________
Give a man a fish and he will be back for more. Slap him with a fish and he will go away forever.