mirror of
https://github.com/actions/runner-images.git
synced 2026-01-04 01:03:18 +08:00
added new variable to FullSQLPackage function
This commit is contained in:
@@ -7,14 +7,15 @@ Import-Module -Name ImageHelpers -Force;
|
||||
function Download-FullSQLPackage {
|
||||
param(
|
||||
[String]$InstallerPath,
|
||||
[String]$Arguments = ("/MEDIAPATH=$InstallerPath", "/MEDIATYPE=Core","/Action=Download", "/QUIET")
|
||||
[String]$DownloadPath,
|
||||
[String]$Arguments = ("/MEDIAPATH=$DownloadPath", "/MEDIATYPE=Core","/Action=Download", "/QUIET")
|
||||
)
|
||||
Write-Host "Downloading full package to $InstallerPath..."
|
||||
Write-Host "Downloading full package to $DownloadPath..."
|
||||
$process = Start-Process -FilePath $InstallerPath -ArgumentList $Arguments -Wait -PassThru
|
||||
$exitCode = $process.ExitCode
|
||||
if ($exitCode -eq 0)
|
||||
{
|
||||
Write-Host -Object "Full SQL Express package has been successfully downloaded to $InstallerPath : ExitCode: $exitCode"
|
||||
Write-Host -Object "Full SQL Express package has been successfully downloaded to $DownloadPath : ExitCode: $exitCode"
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -68,7 +69,7 @@ $setupPath = Join-Path $downloadPath "SQLEXPR_x64_ENU"
|
||||
md $downloadPath
|
||||
Set-Location -Path $downloadPath
|
||||
$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 -DownloadPath $downloadPath
|
||||
Unpack-SQLInstaller -InstallPath "$setupPath.exe"
|
||||
$resultPath = Join-Path $setupPath "SETUP.exe"
|
||||
Write-Host $resultPath
|
||||
|
||||
Reference in New Issue
Block a user