Skip to content

Commit

Permalink
(chocolateyGH-2112) Add msp installer support to Install-ChocolateyIn…
Browse files Browse the repository at this point in the history
…stallPackage
  • Loading branch information
steviecoaster committed Sep 10, 2020
1 parent 773b185 commit 0d97b6c
Showing 1 changed file with 13 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,7 @@ param(
}

$installerTypeLower = $fileType.ToLower()
if ($installerTypeLower -ne 'msi' -and $installerTypeLower -ne 'exe' -and $installerTypeLower -ne 'msu') {
if ($installerTypeLower -ne 'msi' -and $installerTypeLower -ne 'exe' -and $installerTypeLower -ne 'msu' -and $installerTypeLower -ne 'msp') {
Write-Warning "FileType '$fileType' is unrecognized, using 'exe' instead."
$fileType = 'exe'
}
Expand Down Expand Up @@ -327,6 +327,18 @@ Pro / Business supports a single, ubiquitous install directory option.
$env:ChocolateyExitCode = Start-ChocolateyProcessAsAdmin "$msiArgs" "$($env:SystemRoot)\System32\msiexec.exe" -validExitCodes $validExitCodes -workingDirectory $workingDirectory
}

if ($fileType -like 'msp') {
$msiArgs = "/update `"$fileFullPath`""
if ($overrideArguments) {
Write-Host "Overriding package arguments with '$additionalInstallArgs' (replacing '$silentArgs')";
$msiArgs = "$msiArgs $additionalInstallArgs";
} else {
$msiArgs = "$msiArgs $silentArgs $additionalInstallArgs";
}

$env:ChocolateyExitCode = Start-ChocolateyProcessAsAdmin "$msiArgs" "$($env:SystemRoot)\System32\msiexec.exe" -validExitCodes $validExitCodes -workingDirectory $workingDirectory
}

if ($fileType -like 'exe') {
if ($overrideArguments) {
Write-Host "Overriding package arguments with '$additionalInstallArgs' (replacing '$silentArgs')";
Expand Down

0 comments on commit 0d97b6c

Please sign in to comment.