chocolatey / choco

Chocolatey - the package manager for Windows
https://chocolatey.org
Other
10.33k stars 903 forks source link

Passing the /s /v"MSI Parameters" To Setup.exe with --params #2415

Open usgrcm opened 3 years ago

usgrcm commented 3 years ago

I am currently having an issue with trying to pass parameters over to an InstallShield setup.exe Here is my script: NOTE: First part of script downloads a zip file and extracts to c:\Software

$packageArgs = @{ packageName = 'isspackage' softwareName = 'Install Shield Package' fileType = 'exe' file64 = "C:\Software\isspackage\setup.exe" silentArgs = "/s /v" validExitCodes = @(0, 3010, 1641) }

$additionalArgs = Get-PackageParameters if($additionalArgs['SETUPTYPE']) { $packageArgs['silentArgs'] += " SETUPTYPE=$($additionalArgs['SETUPTYPE'])" }

Install-ChocolateyPackage @packageArgs

So trying to do this: choco install isspackage --params "/SETUPTYPE=Scanning" -y

The install returns back as successful, but I never even see setup.exe load. So I know I am missing something.
Any Ideas?

TheCakeIsNaOH commented 3 years ago

Since you are running with /s as one of the silent args, that is telling the setup.exe to install silently in the background without displaying a GUI. If you are instead talking about the program not showing up in the chocolatey log, post your log (after removing sensitive information).

Also, I would suggest using Install-ChocolateyInstallPackage instead of Install-ChocolateyPackage since the file is already on the local filesystem.

This question probably is more suited for chat, https://ch0.co/community or as a discussion.