I know that you can set the requirement of administrator rights in the application manifest, but this requirement will work from the very beginning of the program launch. And how to call the administrator confirmation in a certain part of the code?

For example, there is a launcher that launches a working client, but first checks the version of the application and updates everything if the version is outdated. The launcher can work from the guest account, and if you need to update the content on the system disk and make entries in the registry, it should display the system window for entering the admin password.

How is this done in Windows?

  • No way =) just by launching the "copy" of the application =) - Vladimir Klykov
  • @Vladimir Klykov, and how are buttons with a brand "shield" hinting at the administrator’s participation in the upcoming operation being done in any installers? For example, when you choose "install for all users" - in many installers there is such a thing ... - Iceman
  • one
    Launch a separate process for which the "elevation" of rights is done. Those. You cannot upgrade the rights of an existing process, you can start a "background" process with admin rights, this is exactly what is being done. - Vladimir Klykov

0