0

When installing a locally hosted chocolatey package based on an installer located on the local network I can see a shim is created. This shim I understand points to the original installer. But for this to work the shim needs to be run in the network location so that the installer can find other required files. I have tried to add the network location to the path using: Install-ChocolateyPath But I have not had success. I've also tried to create a Setup.exe.ignore file in the same directory as the original file on the network without success. I've seen references to --shimgen-usetargetworkingdirectory but I can't figure out how to implement it. Any help is greatly appreciated.

dnvn
  • 11
  • 4

1 Answers1

0

So I figured this out on my own and thought I would share. In chocolateyinstall.ps1 I used Install-ChocolateyInstallPackage instead of Install-ChocolateyPackage which solved my issue related to paths and running the shim in the same directory as the original install file.

More info here:

https://chocolatey.org/docs/helpers-install-chocolatey-package

https://chocolatey.org/docs/helpers-install-chocolatey-install-package

comments in chocolateyinstall.ps1 say it all.

## If you are making your own internal packages (organizations), you can embed the installer or 
## put on internal file share and use the following instead (you'll need to add $file to the above)
Install-ChocolateyInstallPackage @packageArgs # https://chocolatey.org/docs/helpers-install-chocolatey-install-package
dnvn
  • 11
  • 4