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
- 42 Getting started
- 26 Read before posting
- 8 Meet and greet
- 257 General
- 71 News and announcements
- 2 Swag
- 1 Roadmap updates
- 83 Resources
- 12 Knowledge Base
- 17 Webinars
- 1 Shared Script Library
- 2 Blog
- 21 Pro Tips
- 28 Got an idea?
- 3 Atera Academy
- 2 ActionAI
- 1 Copilot
- 142 Remote Monitoring and Management
- 85 Remote Monitoring
- 28 Patch Management
- 107 Professional Services Automation
- 65 Helpdesk
- 17 Billing
- 22 Reporting
- 41 Integrations & add-ons
- 22 Integrations
- 11 Add-ons
- 108 Scripting and automations
- 62 Scripts
- 32 Automations