Search code examples
powershellchocolatey

Why is chocolatey trying to insll to C:\Windows\SysWOW64\WindowsPowerShell\v1.0\Modules


I do

> chocolatey.bat install -force PowerTab
Chocolatey (v0.9.8.23) is installing 'PowerTab' and dependencies. By installing you accept the license for 'PowerTab' an
d each dependency you are installing.
______ powertab v0.99.6 ______
Downloading powertab 64 bit (http://powertab.codeplex.com/downloads/get/159925) to C:\Users\phelan\AppData\Local\Temp\ch
ocolatey\powertab\powertabInstall.zip
Extracting C:\Users\phelan\AppData\Local\Temp\chocolatey\powertab\powertabInstall.zip to C:\Windows\SysWOW64\WindowsPowe
rShell\v1.0\Modules...
C:\Windows\SysWOW64\WindowsPowerShell\v1.0\Modules
powertab has finished successfully! The chocolatey gods have answered your request!
Finished installing 'PowerTab' and dependencies - if errors not shown in console, none detected. Check log for errors if
 unsure.
Reading environment variables from registry. Please wait... Done.
C:\Users\phelan\workspace\weincad.net [master]
>

and the directory it tries to put stuff into is

C:\Windows\SysWOW64\WindowsPowerShell\v1.0\Modules

which can't be correct as it is neither on $env:PSModule path and I don't have permission to write there. I can't find any information in chocolately on where it really should be installing the modules.


Solution

  • It is possible to look "inside" every Chocolatey package using the Nuget Package Explorer in order to see "what is going on". If you do this for the PowerTab package, you will see the following:

    $name   = 'powertab'
    $url    = 'http://powertab.codeplex.com/downloads/get/159925'
    $target = Join-Path $PSHOME 'Modules'
    
    Install-ChocolateyZipPackage $name $url $target
    

    As you can see, the author of this package has chosen specifically to unzip the package to the location that you have mentioned, it is not something that Chocolatey is doing out of the box.

    Since each package is contributed by the community, the best suggestion would be to use the "Contact Maintainers" link on this page:

    PowerTab Package on Chocolatey.org

    to ask the creator of the package directly.

    Hope that helps!

    Gary