ShellExecute has a parameter that allows to request a UAC permission to run a process with elevated rights: runas
Launches an application as Administrator. User Account Control (UAC) will prompt the user for consent to run the application elevated or enter the credentials of an administrator account used to run the application.
But is it possible to do the contrary?
I have an application that is run with elevated rights by default and there are urls which user can open. But if I use ShellExecute
, a default browser will be opened. Some malware can be registered as a default browser.
using CreateProcessAsUser to launch a url - this question seems to be on the same problem. It generally indicates, that CreateProcessAsUser
can't be used to open a URL by itself.