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

7zip extraction with spaces in $extractDir #5

Closed SkilledAlpaca closed 6 years ago

SkilledAlpaca commented 6 years ago

So I run the script in the F:\User Profile\Downloads\ folder. Script downloads the drivers to the C:\Users\Alpaca\AppData\Local\Temp\ folder. Then it starts to extract the 385.69.exe to the F:\User\ folder. It should be extracting to the F:\User Profile\Downloads\ folder but due to there being a space in the path at User Profile it doesn't extract properly.

I can't seem to find the culprit with the 7zip extraction method. Appears 7zip sees the space as a delimiter.

SkilledAlpaca commented 6 years ago

Actually got it working. The -o flag needed double quotes around it.

Line 86 from Start-Process -FilePath $archiverProgram -ArgumentList "x $dlFile Display.Driver NVI2 EULA.txt ListDevices.txt setup.cfg setup.exe -o$extractDir\$version\" -wait to Start-Process -FilePath $archiverProgram -ArgumentList "x $dlFile Display.Driver NVI2 EULA.txt ListDevices.txt setup.cfg setup.exe -o""$extractDir\$version\""" -wait