ZenitH-AT / nvidia-update

Checks for a new version of the NVIDIA driver, downloads and installs it.
MIT License
56 stars 8 forks source link

Script Cannot Download Driver. #14

Open ScottVordem opened 1 year ago

ScottVordem commented 1 year ago

I thought I broke something in it, so I redownloaded from the latest release (1.15.3) and still end up with this error without modifying anything.

Checking for script update...

        Current script version:         1.15.3
        Latest script version:          1.15.3

Detecting GPU and driver version information...

        Detected graphics card name:    GeForce RTX 3080
        Current driver version:         535.98

Ready to download the latest driver installer to "C:\Users\[username]\AppData\Local\Temp\NVIDIA\install.exe"...

Do you want to download and install the latest driver?
[Y] Yes  [N] No  [?] Help (default is "Y"): Y

[17:00:41] Downloading latest driver installer...
Get-WebFile : Cannot validate argument on parameter 'Url'. The argument is null or empty. Provide an argument that is not null or empty, and then try the command again.
At E:\NVUpdate\nvidia-update.ps1:692 char:13
+ Get-WebFile $driverDownloadUrl $driverDownloadPath
+             ~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidData: (:) [Get-WebFile], ParameterBindingValidationException
    + FullyQualifiedErrorId : ParameterArgumentValidationError,Get-WebFile

[17:00:41] Extracting driver files...

ERROR: The system cannot find the file specified.
C:\Users\[username]\AppData\Local\Temp\NVIDIA\install.exe

System ERROR:
The system cannot find the file specified.
Get-Content : Cannot find path 'C:\Users\[username]\AppData\Local\Temp\NVIDIA\driver\setup.cfg' because it does not exist.
At E:\NVUpdate\nvidia-update.ps1:716 char:55
+ ... tup.cfg" -Value (Get-Content -Path "$($extractDir)\setup.cfg" | Selec ...
+                      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (C:\Users\[username]\...river\setup.cfg:String) [Get-Content], ItemNotFoundException
    + FullyQualifiedErrorId : PathNotFound,Microsoft.PowerShell.Commands.GetContentCommand

Set-Content : Could not find a part of the path 'C:\Users\[username]\AppData\Local\Temp\NVIDIA\driver\setup.cfg'.
At E:\NVUpdate\nvidia-update.ps1:716 char:2
+     Set-Content -Path "$($extractDir)\setup.cfg" -Value (Get-Content  ...
+     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (C:\Users\[username]\...river\setup.cfg:String) [Set-Content], DirectoryNotFoundException
    + FullyQualifiedErrorId : GetContentWriterDirectoryNotFoundError,Microsoft.PowerShell.Commands.SetContentCommand

[17:00:42] Installing driver...

UAC prompt declined or an error occurred during installation.
ScottVordem commented 1 year ago

Also, it seems like there is no check to see if the download was successful. Notice how it still attempted a file extraction even though the download failed.

ScottVordem commented 1 year ago

Strange, checked again today just now and now it is working as normal even though nothing changed.

I'll leave it open in case this is still something that needs to be fixed.

ZenitH-AT commented 1 year ago

Yes thanks, I will look into it next weekend. I haven't had much time to work on this lately. I'll add some validation after the download function returns.

Sorry I haven't go to this yet. Life has been really busy.