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

Allow Winget to run as another user, or at least disable UAC #1901

Open
overtech-nc opened this issue Feb 4, 2022 · 9 comments
Open

Allow Winget to run as another user, or at least disable UAC #1901

overtech-nc opened this issue Feb 4, 2022 · 9 comments
Labels
Issue-Feature This is a feature request for the Windows Package Manager client.

Comments

@overtech-nc
Copy link

Description of the new feature / enhancement

We are using a RMM tool and want to run a periodic script that would launch winget on workstations, but we can't find a way to make it work like we need to.

If we run it with the logged-on user credentials, UAC will pop up each time an app wants to upgrade, even with the -h or --silent option (I'm assuming it has nothing to do with the UAC prompt then, but more with the actual program window)

If we try to run it with other admin credentials, it will say that the winget command is not recognized (even if it actually works if we log into that particular account).

Having winget run on another admin account (without any prompt appearing on the screen) would be perfect, as it would allow us to upgrade apps easily even on workstations on which users are using a standard account, without disturbing them.

Is there already a way of doing this that we are not aware of ?

Thank a lot !

Proposed technical implementation details

No response

@overtech-nc overtech-nc added the Issue-Feature This is a feature request for the Windows Package Manager client. label Feb 4, 2022
@ghost ghost added the Needs-Triage Issue need to be triaged label Feb 4, 2022
@overtech-nc overtech-nc changed the title Allow to run Winget as another user, or at least disable UAC Allow Winget to run as another user, or at least disable UAC Feb 4, 2022
@jedieaston
Copy link
Contributor

If we try to run it with other admin credentials, it will say that the winget command is not recognized (even if it actually works if we log into that particular account).

This is most likely related to #1474, I'm not sure what the ongoing status is of that issue (besides that it isn't fixed).

@o-l-a-v
Copy link

o-l-a-v commented Feb 4, 2022

You could run it as SYSTEM though, right?

Examples running from Intune:

@denelon denelon removed the Needs-Triage Issue need to be triaged label Feb 4, 2022
@overtech-nc
Copy link
Author

You could run it as SYSTEM though, right?

Examples running from Intune:

Sadly not, it gives me that kind of error : "Program 'winget.exe' failed to run: The file cannot be accessed by the system.At line..."

Thank you very much for your link, I will have a look :)

@jedieaston
Copy link
Contributor

I think Intune copies the script and runs it locally vs opening a remote shell and putting commands in, like PsExec or other RMM tools do. That will cause different behavior in this instance due to the AEA issue.

@o-l-a-v
Copy link

o-l-a-v commented Feb 5, 2022

Sadly not, it gives me that kind of error : "Program 'winget.exe' failed to run: The file cannot be accessed by the system.At line..."

Thank you very much for your link, I will have a look :)

Well, you don't run "winget" from system context, but AppInstallerCli.exe. I still think it's possible from an RMM.

#962 (comment)

@jedieaston
Copy link
Contributor

Oh, yes, that works. AppInstallerCLI.exe is a real executable as opposed to a funny one.

@overtech-nc
Copy link
Author

overtech-nc commented Feb 6, 2022

I also tried with AppInstallerCLI.exe and got the same error.

In the end, we will use PatchMyPC, which works correctly in all cases and doesn't even require to be installed!

@dreaddr
Copy link

dreaddr commented Jul 12, 2022

Still using PatchMyPC here as well, as this is not properly implemented here. Would be very convenient if it was possible with winget though.

@denelon
Copy link
Contributor

denelon commented Jul 14, 2022

#2338 (comment)

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

5 participants