Chocolatey v0.13.3 (Free version)
We are creating Chocolatey Packages for our Install Shield msi installers. When installing we are passing in package parameters (-params ) to configure some of the application configuration files after the installation.
powershell cmd
cinst Company.Package –Version 1.2.3 -myf -params "DBName=DB1;DBIP=123.4.5.6;DBSomethingElse=true"
All the parameters get passed in correctly and update the configuration files but chocolatey throws and error saying the 2nd param is not recolonized, which fails the installation.
ERROR: The term 'DBIP=123.4.5.6' is not recognized as the name of a cmdlet
chocolateyinstall.ps1
Install-ChocolateyInstallPackage @packageArgs
if ( $null -ne $env:chocolateyPackageParameters )
{
Invoke-Expression "& $( Join-Path $toolsDir 'Configuration.ps1' ) $($env:chocolateyPackageParameters)"
}
And in the tools/Configuration.ps1 we are splitting the paramaters like so
$(ConvertFrom-StringData -StringData $env:chocolateyPackageParameters.Replace( ";", "`n" ) )
What am i missing?
I know there are better ways to configure a system (puppet,chef...) but this is all i have available atm