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

7-Zip doesn't extract files after installed by the script (without running the script again) #7

Closed Sgt-Nukem closed 1 year ago

Sgt-Nukem commented 1 year ago

Downloaded and ran powershell -ExecutionPolicy Bypass -File nvidia-update.ps1, got error I don't get:

image

ZenitH-AT commented 1 year ago

That error is from 7-Zip extraction process, so it's probably something to with the extraction argument list string I'm using in the script. I'm likely incorrectly handling spaces in the user folder. It could also be caused by 7-Zip having just been installed.

Does the error occur if you try run the script again, now that 7-Zip is installed? If so, does the user folder you censored have a space in the name?

I'm planning to get a new release out soon so I'll fix this asap.

ZenitH-AT commented 1 year ago

I just tested on a VM and was able to reproduce the error. It's not related to a space in the user folder name. I'm looking into the actual cause now.

ZenitH-AT commented 1 year ago

Does the error occur if you try run the script again, now that 7-Zip is installed?

I tested this on a VM and it works. Does it work for you, too? I'll need to figure out why 7-Zip can't be run after installation without running the script again.

I found that I wasn't setting the archiver path after 7-Zip installation, so added code to do that but it still sets it as null. It seems PowerShell can't see registry changes made while the script is running. I have an idea how to fix this and will update this comment when I do.


Fixed by https://github.com/ZenitH-AT/nvidia-update/commit/2b3e99ecb4762cb549424f26e6ad1029485552fc, there was more than one issue with the code causing this.

For now, just run the script again and it should work.

ZenitH-AT commented 1 year ago

Fixed by https://github.com/ZenitH-AT/nvidia-update/commit/2b3e99ecb4762cb549424f26e6ad1029485552fc, which will be in the next release. Keep in mind this latest git version of the script won't detect GPU data until I update the nvidia-data repository.

For now, just run the existing release version of the script again and it should work.