My program currrent has the line
Status := DllRegisterServer;
which fails on a machine that is WIN7 and the user is not administrator.
Is it possible to programatically call DllRegisterServer with elevated rights?
Or is there some way I can prompt for the elevated rights then use that info to perform the DllRegisterServer.
Elevation can only be performed at the time of process creation. So you need a new process to execute this code. Your main options:
Of these options, number 1 is likely to be simpler for you. You don’t need a separate executable for option 1. You can pass command line arguments that will result in the call to the registration function.