locked
Calling CreateProcessAsUser from COM object fails with ERROR_ELEVATION_REQUIRED (740) RRS feed

  • Question

  • My application is started and the UAC prompt is triggered. After confirmation all works fine until I want to launch a subprocess from an in-process COM object. There I get the ERROR_ELEVATION_REQUIRED. Imho it should start without problems, since the parent process is already elevated... Using ShellExecute instead works fine without triggering the UAC prompt but is not an option since I need to create the process as a specific user.

     

    The token used in CreateProcessAsUser is obtained from GetProcessToken and then duplicated with DuplicateTokenEx to get an impersonatable token.

     

    The code works fine in windows XP.

     

    Any ideas?

     

    Bernd

     

    Tuesday, September 18, 2007 8:46 AM