How to run maui app as admininstrator after deployment as unpacakged(exe)

Dani_S 3,911 Reputation points
2024-12-25T14:10:44.66+00:00

Hi,

How I run maui app on windows 8 as admin after deployment as unpcakaged (exe).

This deployment command.

dotnet publish -f net8.0-windows10.0.19041.0 -c Release /p:AppxPackageSigningEnabled=true /p:PackageCertificateThumbprint="c01ba45666762f3615cf6813aeb4dc4b1919541d" -p:RuntimeIdentifierOverride=win10-x64

I do not want to set on exe properties / compability to run as administrator.

Please supply all steps for that.

Thanks in davance,

Update:

1.what the user will see when he click on exe?

2.does in shortcut combalty mode i will see run as admin?

3.it mention that this will on certain windows ,sdk 1.1 and above, is it a real problem fir the app?

I set it to administrator .After publish the exe icon is with icon of admin. But i do not see any popup of require of admin acknoledge when clicking on it.

.NET MAUI
.NET MAUI
A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
3,827 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Bruce (SqlWork.com) 69,276 Reputation points
    2024-12-25T22:19:54.4166667+00:00

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.