Closed TVMike closed 1 year ago
Thanks a lot for reporting this.
This is actually really interesting because the
START /WAIT ""%PACKAGEPATH%\AMD_Chipset_Software.exe /S /V" SILENT=1 /qr" /clone_wait
command in this package could only ever work if run by cmd.exe
- I don't know any other context in which START /WAIT <executable>
is valid syntax. So that would mean Lenovo System Update must run these command strings through cmd.exe
when executing, but I had previously also seen commands that would NOT work as-is if passed to cmd.exe
, for example:
%PACKAGEPATH%\n1cgf02w_version.exe /hwid USB\VID_1FD2&PID_5003 /fw 0301.0500.0000.0008
from this package. This would fail in cmd because the unescaped &
is seen as a command delimiter.
I think this means that either Lenovo System Update does some really complex editing and fixing-up of their own command strings before running them or some of these commands just fail for them as well, but the failures aren't reported.
LSUClient used to run external commands through cmd.exe /D /C
, but I have moved away from that ever since Version 1.2.3 because I loose some control over the started process if cmd acts as a middleman and its complex quoting and escaping rules had also been the cause of several bugs over time. Not using cmd anymore has definitely improved the robustness of LSUClients' external command handling.
BUT, given that we now have this START /WAIT
situation at our hands, I think there's only two solutions to make commands like that work:
cmd.exe
again, possibly only as a fallback if the command doesn't otherwise appear validSTART /WAIT
would be removedRight now, I'm thinking I want to go with approach 2 and stick with avoiding cmd as it has served me well so far.
Will update as I try things.
Hi, I have pushed some changes that should fix this to the develop branch.
Please download and try with that version.
Hi Jantari,
sorry, because I would need to rewrite my script using the branch instead of the PSGallery.
The u6etn07us14wsusi_p620
package should now install with LSUClient version 1.5.0, but I decided to pull and delay the workaround to get u6chp10us14wsusi_p620
working because I wasn't happy with it - so this isn't fully solved and I'm leaving the issue open
Hey Jantari,
thanks for your effords. Stupid question, is there an option to run your scripts for LSU in your side branches, without loading them from PSGallery? Background is, what I'm calling your scripts from the PSGallery only yet, and there is only the most current version of LSU present.
I would download the side branch files as a ZIP from GitHub, then extract, import and run that on a test machine.
I don't recommend using work-in-progress branches in production though.
Hi Jantari,
I was able to run your dev LSU branch now, with following command lines edited within my script:
_# Load local Module from C:\Temp $null = Install-PackageProvider -Name NuGet -Force $null = Import-Module C:\Temp\LSUClient_DEV\LSUClient.psd1 -Force $null = Import-Module C:\Temp\LSUClientDEV\LSUClient.psm1 -Force
It seems like that one package (u6chp10us14wsusi_p620) still does not really like the install calls. See for that the attached log. The driver for the Marvel AQtion NIC was installed sucessfully. But the u6chp10us14wsusi_p620 seems to still have an issue. LSUClient_P620_11112022.log
Hope that helps to fix the issues with the AMD Chipset driver package. Apologies, that it took so long for me to test again.
Yes, the fix to get u6chp10us14wsusi_p620
working is more difficult and the problem does not seem to affect many packages (this is the only one I've seen so far) so some other things have taken priority for me. I do intend to follow up on this though because it is a legitimate deficiency in LSUClient.
I can now focus more on the topic with the LSU. Is there maybe something I can help you with?
What I have experienced, was that some also nVIDIA drivers for the P620 series did not install as well, just because they were not detected. But that is only a minor thing.
It would be helpful to know whether you've seen this specific problem with more packages other than u6chp10us14wsusi_p620
.
I haven't had any other reports of it, so I might just trim START /WAIT
from the beginning of all commands as a workaround. It wouldn't be a 100% solution because START
could have additional parameters such as /B
in some cases that wouldn't be removed but it would at least fix this particular package.
For the NVIDIA driver please open a separate issue with the Get-LSUpdate -Verbose -Debug
output from the affected computer. That will contain all the information neccessary to determine why the package was not detected.
I have implemented a quick but safe workaround for this package, it should now install correctly with LSUClient 1.5.2
Version
1.4.2
Computer Model
30E00035GE
Problem
Hi,
the installation process for the Lenovo ThinkStation P620 seem not to work properly. See the attached log for that.
Two packages fail, due to wrong calls on the source files:
LSUClient.log
Temporary folder for download and execution is: C:\Temp\LSUClient\Logs -> for Log files C:\Temp\LSUClient\Temp -> for install files
Best regards!
Additional context
Installing update 1 of 4: u3vdo22us14wsusi_p620 Nvidia Quadro Discrete Graphics Driver(Windows 10 Version 20H2) - 10 [64] VERBOSE: Installing package u3vdo22us14wsusi_p620 ... Update u3vdo22us14wsusi_p620 finished with exitcode 0 and reboot requested as REBOOT_SUGGESTED Update u3vdo22us14wsusi_p620 successfully installed! Installing update 2 of 4: u6chp10us14wsusi_p620 AMD Chipset Driver (Windows 10 Version 20H2) - 10 [64] VERBOSE: Installing package u6chp10us14wsusi_p620 ... WARNING: The command or file 'START /WAIT ""%PACKAGEPATH%\AMD_Chipset_Software.exe /S /V" SILENT=1 /qr" /clone_wait' could not be found from 'C:\Temp\LSUClient\Temp\u6chp10us14wsusi_p620' and was not run Update u6chp10us14wsusi_p620 finished with exitcode and reboot requested as NONE Update u6chp10us14wsusi_p620 failed to install! Installing update 3 of 4: u6etn07us14wsusi_p620 Marvell Ethernet Driver (Windows 10 Version 20H2) - 10 [64] VERBOSE: Installing package u6etn07us14wsusi_p620 ... WARNING: The command or file 'msiexec /i %PACKAGEPATH%\Marvell_AQtion_x64_Win10_20H2_ver2.2.3.0.msi /q' could not be found from 'C:\Temp\LSUClient\Temp\u6etn07us14wsusi_p620' and was not run Update u6etn07us14wsusi_p620 finished with exitcode and reboot requested as NONE Update u6etn07us14wsusi_p620 failed to install! Installing update 4 of 4: u7aud11us14wsusi_p620 Realtek Audio Driver(Windows 10 Version 20H2) - 10 [64] VERBOSE: Installing package u7aud11us14wsusi_p620 ... Update u7aud11us14wsusi_p620 finished with exitcode 0 and reboot requested as REBOOT_SUGGESTED Update u7aud11us14wsusi_p620 successfully installed!