I keep getting the same error with my chocolatey package: Exit code was '-1'
. I am not sure if it is something wrong with my chocolateyinstall.ps1
or the setup.exe
I am using to make this embedded installer. The image below shows both the chocolateyinstall.ps1
and the cmd when trying to run choco install (packagename)
. Thanks.
Here is the code:
$packageArgs = @{
packageName = 'armrvds'
fileType = 'exe'
file = "$(Split-Path -parent $MyInvocation.Mycommand.Definition)\setup.exe"
validExitCodes = @(0)
softwareName = 'ARM RVDS 4.1*'
Install-ChocolateyInstallPackage @packageArgs
Exit code was '-1'
means that the exit code of the installer was -1
, and not 0
or another acceptable exit code to be treated as successful. You will need to figure out why your setup.exe
is failing. You may be able to find more information about why the installer failed if you look at C:\ProgramData\Chocolatey\logs\chocolatey.log
as the error indicates.
One thing I notice is you are not setting the silent installation arguments as part of your arguments to Install-ChocolateyInstallPackage
, which at a minimum may cause your package to require interactivity (you don't want this). You should find out what the silent installation arguments are to setup.exe
.
In your case, it looks like RVDS uses a different program to install silently (page 7). Note that this is for 3.1, not 4.1, so you should either try to find up to date documentation, or see if setupcli
still exists in 4.1 and start looking at the parameters it supports.