Page 2 of 4
Re: Auto-Install failing. "Access to the path 'C:\ProgramData\chocolatey\lib\"
Posted: Wed Feb 10, 2021 7:59 pm
by aaroncampbell72
After upgrading to the current version, we're still getting failures on the auto-installs:
"This is try 1/3. Retrying after 300 milliseconds.
Error converted to warning:
Access to the path 'C:\Windows\TEMP\chocolatey' is denied.
This is try 2/3. Retrying after 400 milliseconds."
The following pic is the script of the ELSE section:
Re: Auto-Install failing. "Access to the path 'C:\ProgramData\chocolatey\lib\"
Posted: Thu Feb 11, 2021 2:38 pm
by Cubert
Interesting inside your script line 25 should be set to "continue on failure" but is not. I have looked at ours and it is set as such.
Not sure why yours didn't?
If you make that change in script it should skip that issue on next runs.
Re: Auto-Install failing. "Access to the path 'C:\ProgramData\chocolatey\lib\"
Posted: Mon Feb 15, 2021 5:20 pm
by aaroncampbell72
I made the change to line 25 but it's still giving the same failure message when the "Chocolatey For LabTech Installer" script runs:
Chocolatey v0.10.15
Chocolatey detected you are not running from an elevated command shell
(cmd/powershell).
There's two different scripts but the only one I can modify is the Maintenance script.
Re: Auto-Install failing. "Access to the path 'C:\ProgramData\chocolatey\lib\"
Posted: Tue Feb 16, 2021 1:34 pm
by Cubert
looking in to this further as it looks like something changed in either Windows or Automate agent permissions.
Re: Auto-Install failing. "Access to the path 'C:\ProgramData\chocolatey\lib\"
Posted: Tue Feb 16, 2021 4:42 pm
by aaroncampbell72
Thank you very much for working with me on this. I feel like we're making some progress as it is now downloading the packages, but failing to install them.
Progress: Downloading DotNet3.5 3.5.20160716... 99%
Progress: Downloading DotNet3.5 3.5.20160716... 100%
DotNet3.5 not installed. An error occurred during installation:
Access to the path 'C:\ProgramData\chocolatey\lib\DotNet3.5' is denied.
DotNet3.5 package files install completed. Performing other installation steps.
The install of DotNet3.5 was NOT successful.
DotNet3.5 not installed. An error occurred during installation:
Access to the path 'C:\ProgramData\chocolatey\lib\DotNet3.5' is denied.
Re: Auto-Install failing. "Access to the path 'C:\ProgramData\chocolatey\lib\"
Posted: Wed Feb 17, 2021 2:47 pm
by Cubert
What is your security settings for the following set of directories?
Here is an example of mine, I have SYSTEM with full control which is what my Automate agent is running as. If you are using a different user to launch the Automate agent is that user have write permissions for the following directories?

- Capture.PNG (19.95 KiB) Viewed 9976 times
Re: Auto-Install failing. "Access to the path 'C:\ProgramData\chocolatey\lib\"
Posted: Wed Feb 17, 2021 5:52 pm
by aaroncampbell72
My agent is running as System and my security permissions for folder C:\ProgramData match your settings.
Re: Auto-Install failing. "Access to the path 'C:\ProgramData\chocolatey\lib\"
Posted: Thu Feb 18, 2021 2:24 pm
by Cubert
Does it match at the Libs directory the same as it is here? Trying to understand why Chocolatey fails with permissions to execute from directory if SYSTEM has full control?
Does the DOTNET3.5 file exist in that directory?
Re: Auto-Install failing. "Access to the path 'C:\ProgramData\chocolatey\lib\"
Posted: Thu Feb 18, 2021 3:12 pm
by aaroncampbell72
It does not. It also does not exist in the lib-bad directory.
Re: Auto-Install failing. "Access to the path 'C:\ProgramData\chocolatey\lib\"
Posted: Mon Feb 22, 2021 1:26 pm
by Cubert
Can you monitor this directory during a install run to see if it ever shows up?
'C:\ProgramData\chocolatey\lib\DotNet3.5'
Next try installing something else like putty or 7Zip and see if the same results happen. I am wondering if it maybe a package issue and not a plugin (execution) issue