Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Install latest version of Nodepad++ via PowerShell, inspired by: https://gist.github.com/kurokikaze/350fe1713591641b3b42
# https://github.com/notepad-plus-plus/notepad-plus-plus/issues/604#issuecomment-126175283
$res = Invoke-WebRequest https://notepad-plus-plus.org/update/getDownloadUrl.php
if ($res.StatusCode -ne 200) {throw ("status code to getDownloadUrl was not 200: "+$res.StatusCode)}
$dlurl = ($res.Content | Select-Xml /GUP/Location).node.InnerXML
$installerPath = Join-Path $env:TEMP (Split-Path $dlurl -Leaf)
Invoke-WebRequest $dlurl -OutFile $installerPath
Start-Process -FilePath $installerPath -Args "/S" -Verb RunAs -Wait
Remove-Item $installerPath
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.