Some programs are automatically asking for administrator rights when you run them. These programs are marked with a little shield in the bottom right corner:
Now I\'m
You must be probably looking for CreateProcessAsUser or CreateProcessWithLogonW function.
There is one more option like this:-
Soemthing like this:
And as Syam correctly mentioned in the comments the solution could be to embed a manifest in the executable.
Actually, this shield which means the application will need to run from administrator is set from the operating system if the application going to use any feature of that machine which needs permission from administrator.
You do not need to set anything from your app for that.
Hope the answer may help you.