change pathes to avoid installation problems

This commit is contained in:
Dariy.Nurgaleev
2020-03-24 15:37:56 +07:00
parent 409a20175e
commit bbf8c7f71c

View File

@@ -7,7 +7,7 @@ Import-Module -Name ImageHelpers -Force;
function Download-FullSQLPackage {
param(
[String]$InstallerPath,
[String]$Arguments = ("/MEDIAPATH=C:\SQLInstall", "/MEDIATYPE=Core","/Action=Download", "/QUIET")
[String]$Arguments = ("/MEDIAPATH=$InstallerPath", "/MEDIATYPE=Core","/Action=Download", "/QUIET")
)
Write-Host "Downloading full package to $InstallerPath..."
$process = Start-Process -FilePath $InstallerPath -ArgumentList $Arguments -Wait -PassThru
@@ -65,8 +65,9 @@ function Start-Installer {
$installerUrl = "https://go.microsoft.com/fwlink/?linkid=866658"
$downloadPath = "C:\SQLInstall"
$setupPath = Join-Path $downloadPath "SQLEXPR_x64_ENU"
md $downloadPath
Set-Location -Path $downloadPath
$installerPath = Start-DownloadWithRetry -Url "https://go.microsoft.com/fwlink/?linkid=866658" -Name "SQL2019-SSEI-Expr.exe"
$installerPath = Start-DownloadWithRetry -Url "https://go.microsoft.com/fwlink/?linkid=866658" -DownloadPath $downloadPath -Name "SQL2019-SSEI-Expr.exe"
Download-FullSQLPackage -InstallerPath $installerPath
Unpack-SQLInstaller -InstallPath "$setupPath.exe"
$resultPath = Join-Path $setupPath "SETUP.exe"