change pathes to avoid installation problems
This commit is contained in:
@@ -7,7 +7,7 @@ Import-Module -Name ImageHelpers -Force;
|
|||||||
function Download-FullSQLPackage {
|
function Download-FullSQLPackage {
|
||||||
param(
|
param(
|
||||||
[String]$InstallerPath,
|
[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..."
|
Write-Host "Downloading full package to $InstallerPath..."
|
||||||
$process = Start-Process -FilePath $InstallerPath -ArgumentList $Arguments -Wait -PassThru
|
$process = Start-Process -FilePath $InstallerPath -ArgumentList $Arguments -Wait -PassThru
|
||||||
@@ -65,8 +65,9 @@ function Start-Installer {
|
|||||||
$installerUrl = "https://go.microsoft.com/fwlink/?linkid=866658"
|
$installerUrl = "https://go.microsoft.com/fwlink/?linkid=866658"
|
||||||
$downloadPath = "C:\SQLInstall"
|
$downloadPath = "C:\SQLInstall"
|
||||||
$setupPath = Join-Path $downloadPath "SQLEXPR_x64_ENU"
|
$setupPath = Join-Path $downloadPath "SQLEXPR_x64_ENU"
|
||||||
|
md $downloadPath
|
||||||
Set-Location -Path $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
|
Download-FullSQLPackage -InstallerPath $installerPath
|
||||||
Unpack-SQLInstaller -InstallPath "$setupPath.exe"
|
Unpack-SQLInstaller -InstallPath "$setupPath.exe"
|
||||||
$resultPath = Join-Path $setupPath "SETUP.exe"
|
$resultPath = Join-Path $setupPath "SETUP.exe"
|
||||||
|
|||||||
Reference in New Issue
Block a user