chocolatey-licensed-issues
chocolatey-licensed-issues copied to clipboard
Install of License Requires Subsequent Admin Chocolatey Execution
What You Are Seeing?
When installing a new license file, Chocolatey needs invoked as admin again in order for the config update with the new password entry for the chocolatey.licensed source to be written to the chocolatey.config file.
What is Expected?
This config change should not require an additional invoking of Chocolatey as admin to make work. This should all be handled by the same session.
How Did You Get This To Happen? (Steps to Reproduce)
- Ran
choco upgrade chocolatey-license -y
logged in as a non-admin user but having background service configured. - Next time a chocolatey command is run by the same user an error is thrown.
System Details
- OS Build: 10.0.20348.0
- Windows PowerShell version: 5.1.20348.558
- Chocolatey version: 1.1.0
Output Log
Full Log Output
PS C:\Users\bob> choco upgrade chocolatey-license -y
Chocolatey v1.1.0 Business
Running in background mode
Upgrading the following packages:
chocolatey-license
By upgrading, you accept licenses for the packages.
You have chocolatey-license v2023.05.13 installed. Version 9999.04.03 is available based on your source(s).
Progress: Downloading chocolatey-license 9999.04.03... 100%
chocolatey-license v9999.04.03
chocolatey-license package files upgrade completed. Performing other installation steps.
C:\ProgramData\chocolatey\license
The license has been installed.
The upgrade of chocolatey-license was successful.
Software install location not explicitly set, it could be in package or
default install location of installer.
Chocolatey upgraded 1/1 packages.
See the log for details (C:\ProgramData\chocolatey\logs\chocolatey.log).
PS C:\Users\bob> choco
This is try 1/3. Retrying after 400 milliseconds.
Error converted to warning:
Access to the path 'C:\ProgramData\chocolatey\config\chocolatey.config.3872.update' is denied.
This is try 2/3. Retrying after 600 milliseconds.
Error converted to warning:
Access to the path 'C:\ProgramData\chocolatey\config\chocolatey.config.3872.update' is denied.
Maximum tries of 3 reached. Throwing error.
Chocolatey v1.1.0 Business
Please run 'choco -?' or 'choco <command> -?' for help menu.
References
┆Issue is synchronized with this Gitlab issue by Unito