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

Support and questions for using and managing Chocolatey NuGet inside of Labtech
aaroncampbell72
Posts: 33
Joined: Tue Mar 24, 2020 6:59 pm
4

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

Post 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?

User avatar
Cubert
Posts: 2430
Joined: Tue Dec 29, 2015 7:57 pm
8
Contact:

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

Post 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.

aaroncampbell72
Posts: 33
Joined: Tue Mar 24, 2020 6:59 pm
4

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

Post 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.

User avatar
Cubert
Posts: 2430
Joined: Tue Dec 29, 2015 7:57 pm
8
Contact:

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

Post 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 5515 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 5515 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.

aaroncampbell72
Posts: 33
Joined: Tue Mar 24, 2020 6:59 pm
4

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

Post 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.
Attachments
Capture.JPG
Capture.JPG (178.56 KiB) Viewed 5489 times

User avatar
Cubert
Posts: 2430
Joined: Tue Dec 29, 2015 7:57 pm
8
Contact:

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

Post 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.

User avatar
Cubert
Posts: 2430
Joined: Tue Dec 29, 2015 7:57 pm
8
Contact:

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

Post 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.

aaroncampbell72
Posts: 33
Joined: Tue Mar 24, 2020 6:59 pm
4

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

Post 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.

aaroncampbell72
Posts: 33
Joined: Tue Mar 24, 2020 6:59 pm
4

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

Post by aaroncampbell72 »

Here's a screenshot of the app screen.
Attachments
Capture.JPG
Capture.JPG (165.03 KiB) Viewed 5436 times

User avatar
Cubert
Posts: 2430
Joined: Tue Dec 29, 2015 7:57 pm
8
Contact:

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

Post 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

Post Reply

Return to “Chocolatey For Labtech”