Page 1 of 4

Auto-Install failing. "Access to the path 'C:\ProgramData\chocolatey\lib\"

Posted: Fri Jan 15, 2021 4:30 pm
by aaroncampbell72
All auto-installs are failing and script logs for the PCs are all showing "Access to the path 'C:\ProgramData\chocolatey\lib\<package name> is denied."

Does anyone know where the plug-in is pulling its credentials from?

Re: Auto-Install failing. "Access to the path 'C:\ProgramData\chocolatey\lib\"

Posted: Thu Jan 21, 2021 2:30 pm
by Cubert
The agent it's self.

If the agent is running as underprivileged user this can happen. Also id the service account has bee modified to lower permission levels then you may see something like this.

Re: Auto-Install failing. "Access to the path 'C:\ProgramData\chocolatey\lib\"

Posted: Wed Feb 03, 2021 6:20 pm
by aaroncampbell72
What's confusing me is if I go into the plug-in for the client's site, select the PC and one of the packages, it will install without problem. However, when the auto-install cycle runs is when I get the failure to run the script elevated. I'm curious what the difference between the two are.

Re: Auto-Install failing. "Access to the path 'C:\ProgramData\chocolatey\lib\"

Posted: Thu Feb 04, 2021 2:56 pm
by Cubert
Automation uses LTscripting to update and install packages where as a direct manual push of an app uses direct command execution on agent.

So I bet if you change the way the script executes it may start working for you.


Try this,

Edit Scripts/Maintenance/P4L Chocolatey For LabTech Maintenance Service


On line 34 of the ELSE section change the shell type from Shell Enhanced to Shell as Admin

Capture.PNG
Capture.PNG (57.17 KiB) Viewed 9655 times



Afterwards you will need to add a new line just below line 34 that saves "ShellResult" to "CHOCOLOG" variable name so we can continue to test outputs for success and failure.

Capture11.PNG
Capture11.PNG (28.2 KiB) Viewed 9655 times



See if that resolves your install issues. If so we can look to add this as a switch in the plugin so if selected it will force this command type verses the normal shell enhance.

Re: Auto-Install failing. "Access to the path 'C:\ProgramData\chocolatey\lib\"

Posted: Fri Feb 05, 2021 7:43 pm
by aaroncampbell72
Thank you SO much for clearing that up! I don't have a script that starts with "P4L", but I do have one for "Chocolately For LabTech Maintenance Service". However, the "Else" section doesn't look like yours.

Re: Auto-Install failing. "Access to the path 'C:\ProgramData\chocolatey\lib\"

Posted: Mon Feb 08, 2021 2:16 pm
by Cubert
Ah ok then your using Version 2 of Chocolatey For Automate.

Send me a scree shot of the global manager screen so I can confirm the build.

It will be a very similar change in script just a different script.

Re: Auto-Install failing. "Access to the path 'C:\ProgramData\chocolatey\lib\"

Posted: Mon Feb 08, 2021 2:27 pm
by Cubert
Ok if you are using version 2 then there should be a "As Admin" checkbox available when adding a package to the global app manager view.

This instructs the system to install application using this function. So all you should need do is modify the package in the global manager to include this checked box.

Re: Auto-Install failing. "Access to the path 'C:\ProgramData\chocolatey\lib\"

Posted: Mon Feb 08, 2021 7:57 pm
by aaroncampbell72
"As Admin" was checked on all our apps when we initially configured this. The auto-installs were running at one point (last fall I believe) but then they suddenly stopped and haven't worked since. I removed the apps from the global and re-added them "As Admin" but we're still not getting auto-installs to work.

Re: Auto-Install failing. "Access to the path 'C:\ProgramData\chocolatey\lib\"

Posted: Mon Feb 08, 2021 7:59 pm
by aaroncampbell72
Here's a screenshot of the app screen.

Re: Auto-Install failing. "Access to the path 'C:\ProgramData\chocolatey\lib\"

Posted: Tue Feb 09, 2021 2:48 pm
by Cubert
Looks like your on Version 2.0.1.92 You need to update the plugin manually.

We are on 2.0.1.103 which is 11 different updates from the version your on.

The plugin build 2.0.1.103

https://delivery.shopifyapps.com/-/39d4 ... d8b1c52f10

Here is the how-to update plugins guide.

https://www.plugins4labtech.com/pages/h ... to-labtech

Afterwards restart the DBagent on the automate server, close all tech consoles and relaunch them again to see new updates and version build numbers.

If after the update you still see the old build number then your having a permission issue on tech workstation where as it is not allowing the new DLL to download from Automate host to local tech computer.

To fix read the following post

viewtopic.php?f=55&t=5523&sid=d2b460f40 ... 0134667fcf