Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

User Account Control on OK Button

I have researched over the internet about the UAC functionality on the form OK button but couldn't get the information. All of the information related to implementing the UAC is they relaunch the application with the administrative privileges.

My requirement is to make the application in which when user click on OK button with Shield Icon on it, user will be able to save some information in the windows Registry through elevate the user privilege but I don't want to relaunch the application with administrator rights.

like image 679
user1891928 Avatar asked Dec 10 '12 14:12

user1891928


1 Answers

Relaunching the application (or launching a helper application) is what you do. It is the requesting of elevated privileges while launching an application that causes the UAC confirmation screen to appear. The purpose of showing the shield icon is to let the user know that confirmation screen is coming up, basically.

You don't have to just relaunch your application. If your application allows multiple instances, you can launch a second copy with command-line parameters indicating the registry change to make. Or you can have a helper application that does admin things, and launch that as needed. A helper application doesn't need to create or show a window; it can be an entirely background operation.

like image 118
prprcupofcoffee Avatar answered Nov 01 '22 06:11

prprcupofcoffee