Chocolatey bin path moved
We have quite a few scripts that call applications installed through a software bundle. We rely on these for management of our agents.
Today this broke on a newly installed agent.
We have been referencing c:\programdata\chocolatey\bin
to get to the executables. On a new agent installed today that folder does not exist. Instead the executables are in C:\Program Files (x86)\ATERA Networks\AteraAgent\Packages\AgentPackageProgramManagement\bin
This breaks all sorts of things for us. We can't just update our scripts, as that will break things in all our previously deployed agents.
Any suggestions?
Comments
-
Looks like it's been put back where it was. I hope it stays there.
1 -
OK, I might have a workaround.
I created a script to check the location of the bin directory and create a directory junction if it's in the new location. I had to create a junction for the lib directory as well for it to work.
I'll continue testing, but it looks like this will have to be part of our agent deployment moving forward.
FixBinDir.ps1
#Check if c:\programdata\chocolatey\bin exists if(Test-Path "c:\programdata\chocolatey\bin"){
Write-Host "c:\programdata\chocolatey\bin already exists"
exit
} #Check if C:\Program Files (x86)\ATERA Networks\AteraAgent\Packages\AgentPackageProgramManagement\bin exists if(Test-Path "C:\Program Files (x86)\ATERA Networks\AteraAgent\Packages\AgentPackageProgramManagement\bin"){
# Create directory junction
New-Item -ItemType Junction -Path "c:\programdata\chocolatey\bin" -Target "C:\Program Files (x86)\ATERA Networks\AteraAgent\Packages\AgentPackageProgramManagement\bin"
Write-Host "Directory junction created at c:\programdata\chocolatey\bin"
New-Item -ItemType Junction -Path "c:\programdata\chocolatey\lib" -Target "C:\Program Files (x86)\ATERA Networks\AteraAgent\Packages\AgentPackageProgramManagement\lib"
Write-Host "Directory junction created at c:\programdata\chocolatey\lib"
exit
} #If neither directory exists, write message and exit Write-Host "No bin directory found"
exit2 -
0
-
can we get official clarification from the team, what the status is on this please - was it a permanent change ? Was it reverted ?
1 -
Hi,
The path is and remains c:\programdata\chocolatey\bin.
In some instances, on some operating systems, after initial agent installation, the path will change due to the environment variable but restarting the agent (or device) will update the path.If you are still experiencing this, please reach out to support so we can help.
Thank you.
5 -
@Yasmin from Atera Thanks for clarifying this.
1
Topics
- All Topics
- 41 Getting started
- 25 Read before posting
- 8 Meet and greet
- 237 General
- 64 News and announcements
- 1 Swag
- 1 Roadmap updates
- 79 Resources
- 12 Knowledge Base
- 16 Webinars
- 1 Shared Script Library
- 2 Blog
- 19 Pro Tips
- 27 Got an idea?
- 3 Atera Academy
- 2 ActionAI
- 1 Copilot
- 140 Remote Monitoring and Management
- 84 Remote Monitoring
- 27 Patch Management
- 105 Professional Services Automation
- 64 Helpdesk
- 17 Billing
- 21 Reporting
- 36 Integrations & add-ons
- 20 Integrations
- 10 Add-ons
- 103 Scripting and automations
- 61 Scripts
- 30 Automations