From bcb5788368f202e54c666dca93859abb10ee29f3 Mon Sep 17 00:00:00 2001 From: Dmitry Nefedov Date: Mon, 30 Aug 2021 12:15:52 +0300 Subject: [PATCH] Update Download_Sophia.ps1 --- Download_Sophia.ps1 | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Download_Sophia.ps1 b/Download_Sophia.ps1 index 52895c3d..eed66b50 100644 --- a/Download_Sophia.ps1 +++ b/Download_Sophia.ps1 @@ -20,6 +20,7 @@ if ($Wrapper) UseBasicParsing = $true Verbose = $true } + Invoke-WebRequest @Parameters $Parameters = @{ Path = "$DownloadsFolder\Sophia.Script.Wrapper.zip" @@ -27,6 +28,14 @@ if ($Wrapper) Force = $true } Expand-Archive @Parameters + + Remove-Item -Path "$DownloadsFolder\Sophia.Script.Wrapper.zip" -Force + + Start-Sleep -Second 1 + + Invoke-Item -Path "$DownloadsFolder\Sophia Script Wrapper v$LatestStableVersion" + + exit } switch ((Get-CimInstance -ClassName Win32_OperatingSystem).BuildNumber)