Add console output
This commit is contained in:
parent
de58359af4
commit
7e4b132644
1 changed files with 4 additions and 0 deletions
|
@ -8,15 +8,19 @@ function Install-SoftwarePackage([Context] $context, [string] $location, [string
|
|||
$tempDir = $context.GetTempDirectory();
|
||||
$tempFile = Join-Path $tempDir "download.tmp";
|
||||
|
||||
Write-Information "Downloading setup file from $location";
|
||||
$response = Invoke-WebRequest $location -OutFile $tempFile;
|
||||
$fileName = [System.IO.Path]::GetFileName($response.Headers["Location"]);
|
||||
|
||||
Write-Information "Renaming setup file to $fileName";
|
||||
$filePath = Join-Path $tempDir $fileName;
|
||||
Move-Item $tempFile $filePath;
|
||||
} else {
|
||||
$filePath = $location;
|
||||
}
|
||||
|
||||
$fileName = [System.IO.Path]::GetFileName($filePath);
|
||||
Write-Information "Starting installation of $fileName";
|
||||
Start-Process -Wait -FilePath $filePath -ArgumentList $argumentList;
|
||||
|
||||
if ($tempDir) {
|
||||
|
|
Loading…
Reference in a new issue