Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[feat] Support run with administrator default. #4645

Closed
Reknij opened this issue Jul 10, 2022 · 2 comments
Closed

[feat] Support run with administrator default. #4645

Reknij opened this issue Jul 10, 2022 · 2 comments

Comments

@Reknij
Copy link

Reknij commented Jul 10, 2022

Describe the problem

i want run my app with administrator default but i no found documment how to do it.

Describe the solution you'd like

add config to setup requestedExecutionLevel.

Alternatives considered

No response

Additional context

No response

@amrbashir
Copy link
Member

do you mean the installer or the app itself?

if you mean the installer, it already runs with highest possible permissions for perMachine installation (we will offer a perUser option, see #2319).

if you mean the app itself, you can't force it (at least not that I know of), the user has to run it as admin themselves. What you can do instead is instruct your users in README.md or similar to run as admin, maybe detect if the app is not admin and show them a dialog to with a button restart as admin using win32 API ShellExecuteW with runas as the operation or use powershell cmdlet Start-Process with -Verb runas.

@amrbashir amrbashir closed this as not planned Won't fix, can't repro, duplicate, stale Jul 10, 2022
@MoonWX
Copy link

MoonWX commented Apr 14, 2024

Anyone who encounters this problem, and if u mean the app itself, check this out: #7173

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants