All the gup.exe does is to check if there is a newer version than specified by the string input parameter is available. It does not handle the update itself. You would have to code it for yourself.
For example like this in Powershell 5.1 for the 64bit version of Notepad++.
[string]$ScriptFolder = $PSCommandPath | Split-Path -Parent $Notepad = Get-ItemProperty -LiteralPath 'HKLM:\Software\Microsoft\Windows\CurrentVersion\Uninstall\Notepad++' $InstalledVersion = $Notepad.DisplayVersion $UpdateCheck = Invoke-WebRequest -Uri "https://notepad-plus-plus.org/update/getDownloadUrl.php?version=$InstalledVersion" $UpdateCheckAnswer = ([xml]$UpdateCheck.Content).GUP if ($UpdateCheckAnswer.NeedToBeUpdated -eq 'yes') { $Filename = $UpdateCheckAnswer.Location.Split('/')[-1] Invoke-WebRequest -Uri $UpdateCheckAnswer.Location -OutFile "$ScriptFolder\$Filename" & "$ScriptFolder\$Filename" '/S /closeRunningNpp' }