My application only occasionally requires privilege escalation ... I need to refer to some third-party COM components that only work correctly when run as an administrator.
I want my application to request privilege escalation only when it needs it ... As a rule, I do not want my application to run as an administrator if I do not need to use third-party COM components.
I see that CoCreateAsAdmin can potentially solve the problem, but the author of the component does not install the necessary registry entries, and I'm not sure how to use CoCreateAsAdmin in C # and in combination with the Runtime-Callable-Wrapper, which is created by tlbimp.
Another solution would be to create a different process, but I still have no experience with this ... I do not want to create a completely separate application ... I would be happy to create an assembly that works in a split if someone can show me how to force its work.
Thank...
source
share