Chocolatey bin path moved

dfletcher Member Posts: 19

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?


  • dfletcher
    dfletcher Member Posts: 19
    Looks like it's been put back where it was. I hope it stays there.

  • dfletcher
    dfletcher Member Posts: 19

    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.


    #Check if c:\programdata\chocolatey\bin exists
    if(Test-Path "c:\programdata\chocolatey\bin"){
    Write-Host "c:\programdata\chocolatey\bin already exists"
    } #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"
    } #If neither directory exists, write message and exit Write-Host "No bin directory found"

  • nina
    nina Administrator Posts: 428 admin
  • nathan
    nathan Member Posts: 80 ✭✭✭

    can we get official clarification from the team, what the status is on this please - was it a permanent change ? Was it reverted ?