Windows: Run app always as Admin without UAC prompt

  1. 2 weeks ago

    Hi!

    I would like my app to always have admin privileges, but I would like the user to be asked for the admin password only at the very first start.

    I have tried multiple things, but the only working solution so far seems to be an extra helper program which runs as a Windows service. This program is then running always, has admin privileges and communicates with the main program via TCP. But this approach is rather complex.

    Do you have another idea for this?

    Thank You
    Fabian

  2. Jürg O

    Sep 3 Pre-Release Testers, Xojo Pro

    @Florian Kller I would like my app to always have admin privileges, but I would like the user to be asked for the admin password only at the very first start.

    Build Settings -> Windows -> (click the "Gear Icon" in the Inspector on the right) -> Security: Privileges => Administrator

    This will change the application manifest so that the app is being elevated to run as Administrator.

  3. Edited 2 weeks ago

    HI Jörg!

    Thank you for your answer!

    Unfortunately it is not exactly what I am looking for: The app runs with admin privileges but the UAC prompt opens for every start of the app. I want the UAC prompt only for the first time. Later on the app should have admin privileges without asking the user again.

    Best
    Florian

  4. Wayne G

    Sep 4 Pre-Release Testers, Xojo Pro New Zealand axisdirect.nz

    @Florian Kller Don't try to bypass built in security, explain to your clients why you need administrator access and give them the option to install the service mentioned elsewhere.

or Sign Up to reply!