You are doing it correctly, if the password is requested via the UAC dialog. And you cannot bypass UAC, otherwise — who would need such "protection"? The privilege elevation can only be granted via the UAC dialog.
All you can do in your application is to request UAC dialog from the very beginning, by creating and embedding appropriate application
manifest:
http://msdn.microsoft.com/en-us/library/bb756929.aspx[
^].
Please don't tell us "this is not what I want". There is no a way to bypass UAC.
—SA