You cannot acquire elevated privileges after the process has started. Your options are:
- Put the part of your application that requires elevated privileges into a separate process and manifest that with
requireAdministrator
. - Run the part of your application that requires elevated privileges as an out-of-proc COM object.