lord-carlos / nvidia-update

Checks for a new version of the Nvidia Driver, downloads and installs it.
MIT License
147 stars 29 forks source link

Nvidia Driver list URL response does not always contain latest driver version. #25

Open Manakanapa opened 4 years ago

Manakanapa commented 4 years ago

The URL:

https://www.nvidia.com/Download/processFind.aspx?psid=101&pfid=816&osid=57&lid=1&whql=1&lang=en-us&ctk=0

Response does not always contain latest driver version????

header body site

Manakanapa commented 4 years ago

Just inspected the request again on their website and got this...

GET request now: https://www.nvidia.com/Download/processFind.aspx?psid=101&pfid=815&osid=57&lid=2&whql=&lang=en-us&ctk=0&dtcid=0

GET request in PowerShell Script https://www.nvidia.com/Download/processFind.aspx?psid=101&pfid=816&osid=57&lid=1&whql=1&lang=en-us&ctk=0

A suggestion might be to go with this JSON object approach, as it will prevent having to search through the HTML object https://gfwsl.geforce.com/services_toolkit/services/com/nvidia/services/AjaxDriverService.php?func=DriverManualLookup&psid=111&pfid=890&osID=57&languageCode=1078&beta=null&isWHQL=0&dltype=-1&dch=1&upCRD=0&sort1=0&numberOfResults=10

Manakanapa commented 4 years ago

this is how I have updated my version

Checking latest driver version from Nvidia website

$response = Invoke-WebRequest -Uri 'https://gfwsl.geforce.com/services_toolkit/services/com/nvidia/services/AjaxDriverService.php?func=DriverManualLookup&psid=111&pfid=890&osID=57&languageCode=1078&beta=null&isWHQL=0&dltype=-1&dch=1&upCRD=0&sort1=0&numberOfResults=10' -Method GET
$payload = $response.Content | ConvertFrom-Json 
$version =  $payload.IDS[0].downloadInfo.Version
Write-Output "Latest version `t`t$version"

Tested, works well

Manakanapa commented 4 years ago

Tested over 1 week. Working perfectly

Manakanapa commented 4 years ago

If you give me permission to branch I'll create a new PR.

lord-carlos commented 4 years ago

Sure, go ahead.