don't wait for exit and don't delete downloaded installer
This commit is contained in:
@@ -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" }
|
||||
|
||||
Reference in New Issue
Block a user