Skip to content

Commit

Permalink
Capture and log output
Browse files Browse the repository at this point in the history
  • Loading branch information
neilenns committed Dec 7, 2023
1 parent ef373a5 commit 5534f19
Showing 1 changed file with 14 additions and 3 deletions.
17 changes: 14 additions & 3 deletions Build/downgrade_nsis.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,22 @@
################################################################################

$NsisVersion = "3.04"
Invoke-WebRequest "https://netcologne.dl.sourceforge.net/project/nsis/NSIS%203/${NsisVersion}/nsis-${NsisVersion}-setup.exe" -OutFile "C:\WINDOWS\Temp\nsis-${NsisVersion}-setup.exe"
Invoke-Expression "& C:\WINDOWS\Temp\nsis-${NsisVersion}-setup.exe /S"
$downloadUrl = "https://netcologne.dl.sourceforge.net/project/nsis/NSIS%203/${NsisVersion}/nsis-${NsisVersion}-setup.exe"
$downloadPath = "C:\WINDOWS\Temp\nsis-${NsisVersion}-setup.exe"

Write-Host "Downloading NSIS version $NsisVersion"
$response = Invoke-WebRequest $downloadUrl -OutFile $downloadPath -PassThru
Write-Host "Downloaded $($response.BaseResponse.ContentLength) bytes"

Write-Host "Installing NSIS version $NsisVersion"
$installOutput = Invoke-Expression "& $downloadPath /S 2>&1"
Write-Host "Install Output: $installOutput"

$NsisPath = "${env:ProgramFiles(x86)}\NSIS\"
Write-Host "Adding NSIS to the PATH"
Add-MachinePathItem $NsisPath
$env:Path = Get-MachinePath

makensis.exe /VERSION
Write-Host "Checking NSIS version"
$versionOutput = makensis.exe /VERSION
Write-Host "NSIS Version: $versionOutput"

0 comments on commit 5534f19

Please sign in to comment.