-
Whenever possible, all software that I install, I install in a folder of my own, typically So, I installed choco to How come? Is there a way to tell choco to not check whether I have admin right or not? and Is it choco itself pre-emptively wanting admin rights to run the chocolateyinstall.ps1, even though I have nothing privileged there? |
Beta Was this translation helpful? Give feedback.
Replies: 4 comments 1 reply
-
(I'm replying from my phone, so please excuse any brevity or typos) I believe you're asking basically two questions:
Basically, for every chocolatey command there's a method called to determine if admin is required for the command. Many of them just return yes or no, and if it returns yes then chocolatey will alert when you're not running as admin. This is why it alerts regularly, because in the default and suggested configuration you need to be an administrator. Now for the second question: yes, there is a feature that I do not recall the name of, but it allows you to suppress the alert. It will also default to accept the alert if you pass in |
Beta Was this translation helpful? Give feedback.
-
Ok, thanks. I will look into this and other options, today; will report later. |
Beta Was this translation helpful? Give feedback.
-
Ok, got somewhere. Revisited the docs; thankfully, I saw the page where they group choco functions on the basis of needing admin rights or not. I had put together a self-installing *.exe for my program using Inno-Setup and included it into the nuget package; thus, in choco, I had been using Continuing with the docs, I learned that But, I still get the "not elevated shell" warning and passing Here is the test install using the local nuget package:
|
Beta Was this translation helpful? Give feedback.
-
That did the trick. Thank you so much. |
Beta Was this translation helpful? Give feedback.
It shouldn't prevent you from doing unattended. The
--yes
or--confirm
will default to yes after 20 seconds. You can eliminate that prompt completely by runningchoco feature disable --name="'shownonelevatedwarnings'"
: https://docs.chocolatey.org/en-us/configuration/#shownonelevatedwarnings