mirror of
https://github.com/actions/runner-images.git
synced 2026-01-08 11:30:49 +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 {
|
function Download-FullSQLPackage {
|
||||||
param(
|
param(
|
||||||
[String]$InstallerPath,
|
[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
|
$process = Start-Process -FilePath $InstallerPath -ArgumentList $Arguments -Wait -PassThru
|
||||||
$exitCode = $process.ExitCode
|
$exitCode = $process.ExitCode
|
||||||
if ($exitCode -eq 0)
|
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
|
else
|
||||||
{
|
{
|
||||||
@@ -68,7 +69,7 @@ $setupPath = Join-Path $downloadPath "SQLEXPR_x64_ENU"
|
|||||||
md $downloadPath
|
md $downloadPath
|
||||||
Set-Location -Path $downloadPath
|
Set-Location -Path $downloadPath
|
||||||
$installerPath = Start-DownloadWithRetry -Url "https://go.microsoft.com/fwlink/?linkid=866658" -DownloadPath $downloadPath -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 -DownloadPath $downloadPath
|
||||||
Unpack-SQLInstaller -InstallPath "$setupPath.exe"
|
Unpack-SQLInstaller -InstallPath "$setupPath.exe"
|
||||||
$resultPath = Join-Path $setupPath "SETUP.exe"
|
$resultPath = Join-Path $setupPath "SETUP.exe"
|
||||||
Write-Host $resultPath
|
Write-Host $resultPath
|
||||||
|
|||||||
Reference in New Issue
Block a user