changed setupPath join
This commit is contained in:
@@ -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")
|
||||||
Reference in New Issue
Block a user