changed setupPath join

This commit is contained in:
Dariy.Nurgaleev
2020-03-20 18:48:51 +07:00
parent fbf0e5ea07
commit 3c6b72b40d
@@ -45,11 +45,11 @@ function Unpack-SQLInstaller {
function Start-Installer { function Start-Installer {
param( param(
[String]$InstallPath, [String]$InstallerPath,
[String]$Arguments = ("/Q", "/IACCEPTSQLSERVERLICENSETERMS", "/Action=Install", "/INSTANCEID=SQL2019", "/INSTANCENAME=SQL2019", "/SECURITYMODE=SQL", "/SAPWD=P@ssword!!", "/TCPENABLED=1") [String]$Arguments = ("/Q", "/IACCEPTSQLSERVERLICENSETERMS", "/Action=Install", "/INSTANCEID=SQL2019", "/INSTANCENAME=SQL2019", "/SECURITYMODE=SQL", "/SAPWD=P@ssword!!", "/TCPENABLED=1")
) )
Write-Host "Installating SQL Express..." 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 $exitCode = $process.ExitCode
if ($exitCode -eq 0) if ($exitCode -eq 0)
{ {
@@ -67,5 +67,5 @@ $setupPath = Join-Path $downloadPath "SQLEXPR_x64_ENU"
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" -Name "SQL2019-SSEI-Expr.exe"
Download-FullSQLPackage -InstallerPath $installerPath Download-FullSQLPackage -InstallerPath $installerPath
Unpack-SQLInstaller -InstallPath "$setupPath.exe" Unpack-SQLInstaller -InstallPath (Join-Path $setupPath ".exe")
Start-Installer -InstallPath "$setupPath/SETUP.exe" Start-Installer -InstallPath (Join-Path $setupPath "SETUP.exe")