Create directory using native powershell tools

This commit is contained in:
Dariy Nurgaleev
2020-03-30 16:49:34 +07:00
committed by GitHub
parent d062075f2a
commit a48d21f57a

View File

@@ -67,7 +67,7 @@ $installerUrl = "https://go.microsoft.com/fwlink/?linkid=866658"
$downloadPath = "C:\SQLInstall"
$setupPath = Join-Path $downloadPath "SQLEXPR_x64_ENU"
#Create directory for temporary files
md $downloadPath
New-Item -Path $downloadPath -ItemType Directory
Set-Location -Path $downloadPath
$installerPath = Start-DownloadWithRetry -Url $installerUrl -DownloadPath $downloadPath -Name "SQL2019-SSEI-Expr.exe"
Download-FullSQLPackage -InstallerPath $installerPath -DownloadPath $downloadPath
@@ -75,4 +75,4 @@ Unpack-SQLInstaller -InstallPath "$setupPath.exe"
$resultPath = Join-Path $setupPath "SETUP.exe"
Start-Installer -InstallerPath $resultPath
#Cleanup folder with installation packages.
Remove-Item $downloadPath -Recurse -Force
Remove-Item $downloadPath -Recurse -Force