saintwolf
Goto Top

Nvidia Treiber download

ich möchte gerne von der seite denn neuesten treiber laden, mit powershell 2.0

http://www.nvidia.de/Download/processFind.aspx?psid=95&pfid=695& ...

problem ist das sich noch eine seite öffnet

/driverResults.aspx/

wenn es erst ab powershell 3.0 oder 4.0 geht bitte markieren danke

Content-Key: 264364

Url: https://administrator.de/contentid/264364

Printed on: April 19, 2024 at 22:04 o'clock

Member: colinardo
Solution colinardo Feb 24, 2015, updated at Feb 25, 2015 at 06:45:26 (UTC)
Goto Top
ich möchte gerne
ich will auch immer gerne ...
mit powershell 2.0
na dann viel Spaß beim rätseln ;-P
$url = 'http://www.nvidia.de/Download/processFind.aspx?psid=95&pfid=695&osid=19&lid=9&lang=de-de'  
$webclient = new-Object System.Net.WebClient
$link = [regex]::match($webclient.DownloadString($url),'(?s)<tr id="driverList">.*?<a href=''(.*?)''').Groups[1].Value  
$dlLink = 'http://de.download.nvidia.com' + ([regex]::match($webclient.DownloadString($link),'(?s)<a href="[^"]*url=([^"&]*)[^"]*" id="lnkDwnldBtn"').Groups[1].Value)  
write-host "Downloading latest 'GeForce Game Ready Driver' from '$dlLink'" -ForegroundColor Green  
$webclient.DownloadFile($dlLink,'D:\latestdriver.exe')  
@colinardo
Member: Saintwolf
Saintwolf Feb 25, 2015 updated at 06:47:51 (UTC)
Goto Top
Vielen dank, hab es angepasst und alles super

$url = 'http://www.nvidia.de/Download/processFind.aspx?psid=95&pfid=695&osid=19&lid=9&lang=de-de'  
$webclient = new-Object System.Net.WebClient
$link = [regex]::match($webclient.DownloadString($url),'(?s)<tr id="driverList">.*?<a href=''(.*?)''').Groups[1].Value  
$dlLink = 'http://de.download.nvidia.com' + ([regex]::match($webclient.DownloadString($link),'(?s)<a href="[^"]*url=([^"&]*)[^"]*" id="lnkDwnldBtn"').Groups[1].Value)  
write-host "Downloading latest 'GeForce Game Ready Driver' from '$dlLink'" -ForegroundColor Green  
$Filename = $dlLink.substring($dlLink.lastindexof("/")+1)  
write-host "$Filename"  
$webclient.DownloadFile($dlLink,"g:\$Filename")  
write-host "Download ist Fertig"