From 3c6b72b40d600651ad860c0d0622fe481d5cfbab Mon Sep 17 00:00:00 2001 From: "Dariy.Nurgaleev" Date: Fri, 20 Mar 2020 18:48:51 +0700 Subject: [PATCH] changed setupPath join --- images/win/scripts/Installers/Install-SQLExpress.ps1 | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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