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

How to install choco without admin to local path user ? #3442

Closed
6 tasks done
chuongmep opened this issue May 15, 2024 · 2 comments
Closed
6 tasks done

How to install choco without admin to local path user ? #3442

chuongmep opened this issue May 15, 2024 · 2 comments

Comments

@chuongmep
Copy link

Checklist

  • I confirm there are no unresolved issues reported on the Chocolatey Status page.
  • I have verified this is the correct repository for opening this issue.
  • I have verified no other issues exist related to my problem.
  • I have verified this is not an issue for a specific package.
  • I have verified this issue is not security related.
  • I confirm I am using official, and not unofficial, or modified, Chocolatey products.

What You Are Seeing?

I want install choco without admin permistion, but I saw that is don't have any way to change the installation path of choco to user path. At the moment is programdata folder.
image

What is Expected?

I want choco allow can install to special user path.

How Did You Get This To Happen?

I just try to install cho in my computer without permission.

System Details

  • Operating System:
  • Windows PowerShell version:
  • Chocolatey CLI Version:
  • Chocolatey Licensed Extension version:
  • Chocolatey License type:
  • Terminal/Emulator:

Installed Packages

It is not package, it is coco installer.

Output Log

System.UnauthorizedAccessException: Access to the path 'C:\ProgramData\chocolatey\lib-bad' is denied.
   at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
   at System.IO.Directory.InternalCreateDirectory(String fullPath, String path, Object dirSecurityObj, Boolean checkHost)
   at System.IO.Directory.InternalCreateDirectoryHelper(String path, Boolean checkHost)
   at chocolatey.infrastructure.filesystem.DotNetFileSystem.<>c__DisplayClass63_0.<CreateDirectory>b__1()
   at chocolatey.infrastructure.tolerance.FaultTolerance.<>c__DisplayClass1_0.<Retry>b__0()
   at chocolatey.infrastructure.tolerance.FaultTolerance.Retry[T](Int32 numberOfTries, Func`1 function, Int32 waitDurationMilliseconds, Int32 increaseRetryByMilliseconds, Boolean isSilent)
   at chocolatey.infrastructure.tolerance.FaultTolerance.Retry(Int32 numberOfTries, Action action, Int32 waitDurationMilliseconds, Int32 increaseRetryByMilliseconds, Boolean isSilent)
   at chocolatey.infrastructure.filesystem.DotNetFileSystem.CreateDirectory(String directoryPath, Boolean isSilent)
   at chocolatey.infrastructure.filesystem.DotNetFileSystem.EnsureDirectoryExists(String directoryPath, Boolean ignoreError, Boolean isSilent)
2024-05-15 13:39:55,788 10048 [WARN ] - 
Chocolatey installed 0/0 packages. 
 See the log for details (C:\ProgramData\chocolatey\logs\chocolatey.log).
2024-05-15 13:39:55,790 10048 [DEBUG] - Sending message 'PostRunMessage' out if there are subscribers...
2024-05-15 13:39:55,791 10048 [ERROR] - Access to the path 'C:\ProgramData\chocolatey\lib-bad' is denied.
2024-05-15 13:39:55,796 10048 [ERROR] - More Details: System.UnauthorizedAccessException: Access to the path 'C:\ProgramData\chocolatey\lib-bad' is denied.
   at System.IO.__Error.WinIOError(Int32 errorCode, String maybeFullPath)
   at System.IO.Directory.InternalCreateDirectory(String fullPath, String path, Object dirSecurityObj, Boolean checkHost)
   at System.IO.Directory.InternalCreateDirectoryHelper(String path, Boolean checkHost)
   at chocolatey.infrastructure.filesystem.DotNetFileSystem.<>c__DisplayClass63_0.<CreateDirectory>b__1()
   at chocolatey.infrastructure.tolerance.FaultTolerance.<>c__DisplayClass1_0.<Retry>b__0()
   at chocolatey.infrastructure.tolerance.FaultTolerance.Retry[T](Int32 numberOfTries, Func`1 function, Int32 waitDurationMilliseconds, Int32 increaseRetryByMilliseconds, Boolean isSilent)
   at chocolatey.infrastructure.tolerance.FaultTolerance.Retry(Int32 numberOfTries, Action action, Int32 waitDurationMilliseconds, Int32 increaseRetryByMilliseconds, Boolean isSilent)
   at chocolatey.infrastructure.filesystem.DotNetFileSystem.CreateDirectory(String directoryPath, Boolean isSilent)
   at chocolatey.infrastructure.filesystem.DotNetFileSystem.EnsureDirectoryExists(String directoryPath, Boolean ignoreError, Boolean isSilent)
   at chocolatey.infrastructure.app.services.ChocolateyPackageService.MovePackageToFailedPackagesLocation(PackageResult packageResult)
   at chocolatey.infrastructure.app.services.ChocolateyPackageService.HandleFailedOperation(ChocolateyConfiguration config, PackageResult packageResult, Boolean movePackageToFailureLocation, Boolean attemptRollback)
   at chocolatey.infrastructure.app.services.ChocolateyPackageService.HandlePackageResult(PackageResult packageResult, ChocolateyConfiguration config, CommandNameType commandName)
   at chocolatey.infrastructure.app.services.NugetService.Install(ChocolateyConfiguration config, Action`2 continueAction, Action`2 beforeModifyAction)
   at chocolatey.infrastructure.app.services.ChocolateyPackageService.Install(ChocolateyConfiguration config)
   at chocolatey.infrastructure.app.runners.GenericRunner.Run(ChocolateyConfiguration config, Container container, Boolean isConsole, Action`1 parseArgs)
   at chocolatey.infrastructure.app.runners.ConsoleApplication.Run(String[] args, ChocolateyConfiguration config, Container container)
   at chocolatey.console.Program.Main(String[] args)
2024-05-15 13:39:55,796 10048 [DEBUG] - Exiting with 1

Additional Context

No response

@chuongmep chuongmep added the Bug label May 15, 2024
@pauby
Copy link
Member

pauby commented May 15, 2024

Please follow the non-administrative install documentation which requires a different installation location.

@chuongmep
Copy link
Author

Nice, thanks you mate !

@pauby pauby closed this as not planned Won't fix, can't repro, duplicate, stale May 16, 2024
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

2 participants