How to prevent the "choco install" command to not copy the MSI file to temp. #3494
-
I have created a choco package and trying to install for a local machine. I do not want to copy the MSI for temp location of the chocolatey since it is large in size. I want install to be fast. Is there are way to not copy the file to temp. and use the local path. i am using the below command to install the nupkg file by passing MSI file path as argument. Thanks in advance |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
From the sounds of it, and since I assume this is a custom package that you have control over. It sounds like you are using the cmdlet Install-ChocolateyPackage inside of the Instead of using Install-ChocolateyPackage for local files, you should instead make use of the cmdlet Install-ChocolateyInstallPackage which is intended to be used for local executables. |
Beta Was this translation helpful? Give feedback.
-
In chocolateyinstall.ps1 replace the Install-ChocolateyPackage with Install-ChocolateyInstallPackage. For more info read replay of @AdmiringWorm and see the link for more info use this link (https://docs.chocolatey.org/en-us/create/functions/install-chocolateyinstallpackage/) |
Beta Was this translation helpful? Give feedback.
From the sounds of it, and since I assume this is a custom package that you have control over.
It sounds like you are using the cmdlet Install-ChocolateyPackage inside of the
chocolateyInstall
script.This script is intended to be used when needing to download a remote file from the web, and will always download it to a temporary location, which it will also do if you specify a path on the local file system.
Instead of using Install-ChocolateyPackage for local files, you should instead make use of the cmdlet Install-ChocolateyInstallPackage which is intended to be used for local executables.
This won't download or copy anything to the temp directory, but rather run the passed in
file
(orf…