Provisioning: Invoke installer with Start-Process
authorTony Sarajärvi <tony.sarajarvi@qt.io>
Mon, 4 Sep 2017 09:49:20 +0000 (12:49 +0300)
committerJani Heikkinen <jani.heikkinen@qt.io>
Thu, 14 Sep 2017 12:08:32 +0000 (12:08 +0000)
By launching an installer with Start-Process and -Wait,
we make sure no handles are left holding on to the
installer when we try to delete it at cleanup.

Change-Id: Ic9b700ea1ce9e70089ba4cb7e91d9765ca976333
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@qt.io>
coin/provisioning/common/vc_redist.ps1

index 9556766..4213dde 100644 (file)
@@ -59,6 +59,6 @@ echo "Fetching from URL..."
 Download $externalUrl $internalUrl $package
 Verify-Checksum $package $sha1
 echo "Installing $package..."
-cmd /c "$package /q"
+Start-Process -FilePath $package -ArgumentList "/q" -Wait
 echo "Remove $package..."
 del $package