TECH
BLOG

Make it possible for non-administrators to install with Chocolatey

2020
11

beginning

Chocolatey itself is very convenient and I like it, but running PowerShell with administrator privileges and then choco install~ every time was too cumbersome, and I was looking for any good solutions.

Also on the official website for the time being Procedure for making installation possible for non-administrators has been posted, but in my environment, an error occurred and I couldn't set it up..

However, I found another way to make it easy for non-administrators to install, so I decided to leave it as an article that also serves as a memorandum

Remedies

  1. Start PowerShell and run powershell start-process cmd -verb runas
  2. When the command prompt starts in a separate window, run choco install gsudo
  3. Check if the installation is successful with gsudo choco install ~ in PowerShell above

When I run the powershell start-process cmd -verb runas command,A command prompt executed as an administrator starts in a separate window.So by running choco install gsudo, it's the Windows version of sudo Gsudo install.

Now you can run choco install ~ as an administrator by typing in a command from PowerShell in the form of gsudo choco install ~. Now you can install various software on Chocolatey without starting PowerShell as an administrator!

concluding

I'm unfamiliar with PowerShell, partly because I've recently started using it, so I wasn't really sure how to implement the content in the title of this article..

However, if Windows also has a mechanism like sudo, I thought it would be possible to solve it quickly with just that, and when I googled it, I was satisfied that I was able to find a very easy solution

Reference links

RELATED PROJECT

No items found.