Specifying unattended execution doesn't work on Windows install.ps1
Specifying daemon as "service" or "task" for the unattended execution method doesn't work with install.ps1.
For example:
$r = Invoke-WebRequest -useb https://omnitruck.cinc.sh/install.ps1
$r.Content | Invoke-Expression
install -version "16" -daemon 'task'
I believe this is because in the msi installer the features are named Cinc<feature>
and install.ps1 specifies Chef<feature>
Function Install-ChefMsi($msi, $addlocal) {
if ($addlocal -eq "service") {
$p = Start-Process -FilePath "msiexec.exe" -ArgumentList "/qn /i $msi ADDLOCAL=`"ChefClientFeature,ChefServiceFeature`"" -Passthru -Wait -NoNewWindow
}
ElseIf ($addlocal -eq "task") {
$p = Start-Process -FilePath "msiexec.exe" -ArgumentList "/qn /i $msi ADDLOCAL=`"ChefClientFeature,ChefSchTaskFeature`"" -Passthru -Wait -NoNewWindow
}
ElseIf ($addlocal -eq "auto") {
$p = Start-Process -FilePath "msiexec.exe" -ArgumentList "/qn /i $msi" -Passthru -Wait -NoNewWindow
}
Features in cinc 16.8.14-1-x64.msi:
I think simple fix would be to rename these in the install.ps1 to Cinc<feature>
.
Any concerns about breaking older version installation or something?