r/chocolatey • • Jan 10 '24

Resolved Using non admin choco

I have choco installed at C:\\ProgramData\\chocolatey\\bin\\choco.exe

and

D:\sourav\choco\bin\choco.exe

1st one is unreachable as admin access is locked, I want to use the non admin one which is the second directory , if I try using the command choco it goes to the first directory hence i cannot install anything.

Please help.

0 Upvotes

2 comments sorted by

3

u/jinoxide Jan 10 '24

There are various things you can do to run Chocolatey CLI from the second path directly, though I suspect this is not a supported method of running Chocolatey CLI, and there would be absolutely no guarantees that it'd work as expected. The installer contains a warning saying that it won't overwrite an existing install for this reason.

...that said, it sounds like you don't own the system here, and are being prevented from installing stuff by the owner. Please consider that without elevation (admin), many packages will fail to run (so you'll need to think about what you're trying to achieve, here, and if it will ever work), and that if the owner of the system you're on doesn't want you installing stuff maybe you just shouldn't.

1

u/pauby Chocolatey Team Jan 10 '24

The answer by /u/jinoxide is sound, and you should follow that advice. I did want to point you to the docs for a Non-Administrative Install of Chocolatey CLI.