diff --git a/images/win/scripts/Installers/Install-SQLExpress.ps1 b/images/win/scripts/Installers/Install-SQLExpress.ps1 index ebdb2c747..8b40d9219 100644 --- a/images/win/scripts/Installers/Install-SQLExpress.ps1 +++ b/images/win/scripts/Installers/Install-SQLExpress.ps1 @@ -45,11 +45,11 @@ function Unpack-SQLInstaller { function Start-Installer { param( - [String]$InstallPath, + [String]$InstallerPath, [String]$Arguments = ("/Q", "/IACCEPTSQLSERVERLICENSETERMS", "/Action=Install", "/INSTANCEID=SQL2019", "/INSTANCENAME=SQL2019", "/SECURITYMODE=SQL", "/SAPWD=P@ssword!!", "/TCPENABLED=1") ) Write-Host "Installating SQL Express..." - $process = Start-Process -FilePath $InstallPath -ArgumentList $Arguments -Wait -PassThru + $process = Start-Process -FilePath $InstallerPath -ArgumentList $Arguments -Wait -PassThru $exitCode = $process.ExitCode if ($exitCode -eq 0) { @@ -67,5 +67,5 @@ $setupPath = Join-Path $downloadPath "SQLEXPR_x64_ENU" Set-Location -Path $downloadPath $installerPath = Start-DownloadWithRetry -Url "https://go.microsoft.com/fwlink/?linkid=866658" -Name "SQL2019-SSEI-Expr.exe" Download-FullSQLPackage -InstallerPath $installerPath -Unpack-SQLInstaller -InstallPath "$setupPath.exe" -Start-Installer -InstallPath "$setupPath/SETUP.exe" \ No newline at end of file +Unpack-SQLInstaller -InstallPath (Join-Path $setupPath ".exe") +Start-Installer -InstallPath (Join-Path $setupPath "SETUP.exe") \ No newline at end of file