ScoopInstaller / Scoop

A command-line installer for Windows.
https://scoop.sh
Other
21k stars 1.4k forks source link

[Feature] Global app installation with non-Administrator accounts #6016

Open Skyb0rg007 opened 3 months ago

Skyb0rg007 commented 3 months ago

Feature Request

scoop makes the following two assumptions about installation

  1. scoop should not be installed on the Administrator account
  2. Installing an app globally should be done via sudo

However this setup does not work properly if the Windows system only has the Administrator account and a non-Administrator account

Describe the solution you'd like

Some official documentation on how to install applications globally if you are not an Administrator (but have access to the Admin account itself)

Describe alternatives you've considered

Ra2-IFV commented 3 months ago

https://github.com/ScoopInstaller/Scoop/blob/master/libexec/scoop-config.ps1
Set root_path in ~/.config/scoop/config.json

Skyb0rg007 commented 3 months ago

Apologies, but I'm not sure how that fixes the issue. I have my scoop directory at %LOCALAPPDATA%\scoop (as shown in the config file) - the issue only occurs when I want to install an app globally at C:\ProgramData\scoop.

Ra2-IFV commented 3 months ago

yeah this directory requires admin privileges, so set to somewhere else

On June 24, 2024 1:18:45 AM UTC, Skye Soss @.***> wrote:

Apologies, but I'm not sure how that fixes the issue. I have my scoop directory at %LOCALAPPDATA%\scoop (as shown in the config file) - the issue only occurs when I want to install an app globally at C:\ProgramData\scoop.

-- Reply to this email directly or view it on GitHub: https://github.com/ScoopInstaller/Scoop/issues/6016#issuecomment-2185414840 You are receiving this because you commented.

Message ID: @.***> -- Sent from my Android device with K-9 Mail. Please excuse my brevity.

Skyb0rg007 commented 3 months ago

This issue only concerns globally installed applications (scoop install <app> --global) or nonportable apps that require admin permissions (scoop install games/epic-games-launcher).

If the scoop user is an Administrator, they can use sudo (scoop install sudo) to gain permissions for that one installation. However the problem occurs when the scoop user is not an Administrator (but knows the Administrator password).

Ra2-IFV commented 3 months ago

so I misunderstood your question... Sorry. Seems the sudo package in scoop does not really work like the sudo utility in linux, due to varieties between operating systems. Windows and Powershell have the ability to run as other user, you can checkhere, and use your admin account to run powershell first, then run scoop to install apps.
If sudo package can add a option to switch a admin account to run commands(similar to linux), that would be great.