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

UAC prompt when installing application #271

Open
suhailmalik07 opened this issue May 21, 2020 · 12 comments
Open

UAC prompt when installing application #271

suhailmalik07 opened this issue May 21, 2020 · 12 comments
Labels
Issue-Feature This is a feature request for the Windows Package Manager client.

Comments

@suhailmalik07
Copy link

suhailmalik07 commented May 21, 2020

It's ugly when you install a package using the command line and after that, a window prompt appears for a mouse click. Instead of this, something like sudo which ask for password before downloading the package will be beautiful and look consistent.

Yeah, you're right we can open the terminal as an administrator but when you working only on CLI it breaks the flow. It doesn't feel nice that you opened another terminal window just for installing a program.

@suhailmalik07 suhailmalik07 added the Issue-Feature This is a feature request for the Windows Package Manager client. label May 21, 2020
@ghost ghost added the Needs-Triage Issue need to be triaged label May 21, 2020
@HeinVG
Copy link

HeinVG commented May 21, 2020

In Windows, the closest thing to 'sudo' is Runas: https://docs.microsoft.com/en-us/previous-versions/windows/it-pro/windows-server-2012-r2-and-2012/cc771525(v=ws.11)

But the only problem is that the command input is larger compared to just 'sudo winget install package', using runas you would have to do: 'runas /user:\administrator winget install package' (haven't tested that yet)

@byteduck
Copy link

Could winget elevate itself and then install the packages?

@dmex
Copy link

dmex commented May 21, 2020

Could winget elevate itself and then install the packages?

You can run the winget command from an elevated command prompt and won't see any UAC prompts when installing packages.

@jessehouwing
Copy link

start the command prompt elevated using:

winkey, 'cmd', ctl-shift-enter'

@suhailmalik07
Copy link
Author

Yeah, you're right we can open the terminal as an administrator but when you working only on CLI it breaks the flow. It doesn't feel nice that you opened another terminal window just for installing a program.

@suhailmalik07
Copy link
Author

In Windows, the closest thing to 'sudo' is Runas: https://docs.microsoft.com/en-us/previous-versions/windows/it-pro/windows-server-2012-r2-and-2012/cc771525(v=ws.11)

But the only problem is that the command input is larger compared to just 'sudo winget install package', using runas you would have to do: 'runas /user:\administrator winget install package' (haven't tested that yet)

This can do the work if implemented with windows 10 and winget. Never thought MSFT already had something similar to sudo.

@dhenze-dwz
Copy link

dhenze-dwz commented May 23, 2020

start the command prompt elevated using:

winkey, 'cmd', ctl-shift-enter'

For some reason I am getting UAC prompts despite doing this. Any ideas?

Edit: Nevermind, fixed it. Some weird issue with SmartScreen.

@JoBrad
Copy link

JoBrad commented May 24, 2020

Opening a separate elevated prompt not only breaks the user workflow, but also introduces other follow-up steps, too. The user potentially needs to refresh the environment in the other terminal instance, or even destroy it and start over, depending on the updates made.

@madrian-es
Copy link

start the command prompt elevated using:

winkey, 'cmd', ctl-shift-enter'

For some reason I am getting UAC prompts despite doing this. Any ideas?

Edit: Nevermind, fixed it. Some weird issue with SmartScreen.

I'm having the same issue, how did you fix it?

@dhenze-dwz
Copy link

start the command prompt elevated using:

winkey, 'cmd', ctl-shift-enter'

For some reason I am getting UAC prompts despite doing this. Any ideas?
Edit: Nevermind, fixed it. Some weird issue with SmartScreen.

I'm having the same issue, how did you fix it?

iirc all I did was change the local group policy via gpedit.msc:
Local Computer Policy -> Computer Configuration -> Administrative Templates -> Windows Components -> Windows Defender SmartScreen -> Explorer -> Configure Windows Defender SmartScreen

Either enable and set to warn, or disable.

@ofersadan85
Copy link

I solved it for myself through winget itself using gsudo:

winget install gerardog.gsudo
gsudo winget upgrade --all

When it is run from a normal (non admin) user, it will only ask for privileges escalation once (similar to how a normal sudo would work)

@masterflitzer
Copy link

gsudo winget upgrade --all

gsudo is amazing, it even comes with an sudo alias so you can do sudo winget upgrade --all

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Issue-Feature This is a feature request for the Windows Package Manager client.
Projects
None yet
Development

No branches or pull requests