2
Q:

powershell install-package multiple msi from local file

#########################################################################
#Install Microsoft SQL Server System CLR Types package 
$InstallMSI= $SourceRoot+"3rdParty\MS Report Viewer Runtime\SQLSysClrTypes.msi"
msiexec /i $InstallMSI /q
Write-Output "Installing MS Report Viewer Runtime SQLSysClrTypes"
#Wait untill MSI Installer is done  
$StartInstallDate = (Get-Date)
$SucessfullInstall = $Null
do
{
    $SucessfullInstall = get-eventlog -logname application -after $StartInstallDate -Source "MSIInstaller" | where {$_.eventID -eq 11707} 
    Start-Sleep -Seconds 60
    Write-host "Waiting until $InstallMSI is installed"   
}
until ($SucessfullInstall)
#########################################################################

#########################################################################
#Install Microsoft ReportViewer 2012 package 
$InstallMSI= $SourceRoot+"3rdParty\MS Report Viewer Runtime\ReportViewer_2012.msi"
msiexec /i $InstallMSI /q
#Wait untill MSI Installer is done  
$StartInstallDate = (Get-Date)
$SucessfullInstall = $Null
do
{
    $SucessfullInstall = get-eventlog -logname application -after $StartInstallDate -Source "MSIInstaller" | where {$_.eventID -eq 11707} 
    Start-Sleep -Seconds 60
    Write-host "Waiting until $InstallMSI is installed"   
}
until ($SucessfullInstall)
#########################################################################
#########################################################################
0

New to Communities?

Join the community