-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
404 not found and getw10ver7.exe package error on some machines #37
Comments
Hi, this is likely the same issue as #36 and we've also seen it before as part of #35 with Model If you run That file is just missing on Lenovos servers, probably an oversight on their end, but nothing we can fix unless you want to maintain your own repository. The error isn't fatal so the command contines and the warning you get later is when it's trying to run the |
That's understandable. I was thinking I could modify my script to check for the error and report accordingly but when it gets to the point of the error the script just exits so the rest of the script doesn't execute. Is there a way to make Get-LSUpdate (or whatever it's triggering) not exit the script on error? I assume this would also prevent any updates that come after the error from installing also, unless this error is only occuring after the installs are done. |
It's a non-terminating error, so unless you've explicitly set
The error comes from |
Doh, I forgot I had a generic trap in there to capture errors and exit 2 (script failure for syncro so I get alerted). Commenting that out the script continues fine, thanks. I'll add an exception to ignore 404's. Thanks! |
Ah yes, that would explain it as well 😉 |
this makes no difference when running Get-LSUpdate in a normal PowerShell session, but some deployment/script-running solutions wrap the entire script in a big try-catch which triggered on any .NET exception from DownloadFile. Try-Catching the DownloadFile call separately and "downgrading" any exceptions to a PowerShell-native error prevents any unintended script terminations in such cases. I still recommend NOT wrapping LSUClient scripts in a global try-catch whenever it is possible to avoid it. also referencing previous issues #35, #36, #37 and #65
Describe the bug
Getting the error below on a few lenovo machines. Sometimes a few updates are listed then followed by the exception error, but the error is the same either way.
Error messages or Screenshots
PS C:\WINDOWS\system32> Get-LSUpdate
Exception calling "DownloadFile" with "2" argument(s): "The remote server
returned an error: (404) Not Found."
At C:\Program Files\WindowsPowerShell\Modules\LSUClient\1.3.1\private\Save-Pack
ageFile.ps1:46 char:9
WARNING: The command or file '%PACKAGEPATH%\getw10ver7.exe' could not be found
from 'C:\WINDOWS\TEMP\31uqabgy.3sc\yh2s4sbc.huz' and was not run
Please complete the following information:
The text was updated successfully, but these errors were encountered: