SetForegroundWindow problem RRS feed

  • Question

  • The situation:
    1. A installer that uses an external UI (UI.exe) - this file has a valid Verisign signature and has { requestedExecutionLevel level="asInvoker"} launch requirement in the manifest file. We do not want to enforce a administrative installation.
    2. This exe is streamed in the binary table
    At the end of the UISequence  a DLL custom action will unstream the exe file in the temp directory and will launch the UI.exe.

    The problem : the UI.exe is unable to get the focus and just blinks on the taskbar.

    In begining we had a custom action that launched the UI.exe directly but when we encoutered the problem we decided to create the steps 2. and 3. in order to be able to use
    AllowSetforegourndWindow .
    - But AllowSetforegourndWindow always returns ACCESS_DENIED.
    - ShellExecute with various HWND as parent has no effect.
    - CreateProcess also doens't work.

    Any hint/ideea would be much appreciated.

    Best Regards,

    Friday, August 1, 2008 3:47 PM