don't wait for exit and don't delete downloaded installer

This commit is contained in:
2021-05-21 12:35:10 -04:00
parent 1cbe1215fb
commit 2f78034da3
+1 -5
View File
@@ -34,11 +34,7 @@ If ( IsWindowsVersion -ge "10.0" ) {
If ( Test-Path "${DOWNLOADS}\${FILENAME}" )
{
Write-Output "Launching installer: ${DOWNLOADS}\${FILENAME}"
Try { Start-Process -FilePath "${DOWNLOADS}\${FILENAME}" -Wait }
Catch { Write-Output $_.Exception.Message }
Write-Output "Deleting installer: ${DOWNLOADS}\${FILENAME}"
Try { Remove-Item "${DOWNLOADS}\${FILENAME}" }
Try { Start-Process -FilePath "${DOWNLOADS}\${FILENAME}" }
Catch { Write-Output $_.Exception.Message }
}
Else { Write-Output "${DOWNLOADS}\${FILENAME} does not exist" }