add more nvidia api checks
This commit is contained in:
parent
f86025f63d
commit
3cdc8a0172
1 changed files with 11 additions and 2 deletions
|
@ -165,9 +165,18 @@ namespace EnvyUpdate
|
||||||
gpuURL = "http://www.nvidia.com/Download/processDriver.aspx?psid=" + psid.ToString() + "&pfid=" + pfid.ToString() + "&osid=" + osid.ToString() + "&dtcid=" + dtcid.ToString() + "&dtid=" + dtid.ToString(); // + "&lid=" + langid.ToString();
|
gpuURL = "http://www.nvidia.com/Download/processDriver.aspx?psid=" + psid.ToString() + "&pfid=" + pfid.ToString() + "&osid=" + osid.ToString() + "&dtcid=" + dtcid.ToString() + "&dtid=" + dtid.ToString(); // + "&lid=" + langid.ToString();
|
||||||
WebClient c = new WebClient();
|
WebClient c = new WebClient();
|
||||||
gpuURL = c.DownloadString(gpuURL);
|
gpuURL = c.DownloadString(gpuURL);
|
||||||
if (!gpuURL.Contains("://"))
|
if (gpuURL.Contains("https://") || gpuURL.Contains("http://"))
|
||||||
{
|
{
|
||||||
//This means a relative link was used.
|
//absolute url
|
||||||
|
}
|
||||||
|
else if (gpuURL.Contains("//"))
|
||||||
|
{
|
||||||
|
//protocol agnostic url
|
||||||
|
gpuURL = "https:" + gpuURL;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
//relative url
|
||||||
gpuURL = "https://www.nvidia.com/Download/" + gpuURL;
|
gpuURL = "https://www.nvidia.com/Download/" + gpuURL;
|
||||||
}
|
}
|
||||||
string pContent = c.DownloadString(gpuURL);
|
string pContent = c.DownloadString(gpuURL);
|
||||||
|
|
Reference in a new issue