jantari / LSUClient

Orchestrate driver, BIOS/UEFI and firmware updates for Lenovo computers 👨‍💻
https://jantari.github.io/LSUClient-docs/
MIT License
208 stars 22 forks source link

Prerun extraction if ExtractCommand is available. #102

Closed IT360BE closed 12 months ago

IT360BE commented 12 months ago

tested on model : 20S7S02200

This is in the xml:

<Package name="USBDISPLAY_HLUD0_U3DOCK" id="dislink1012875" version="10.1.2875.0" hide="False">
  <Title default="EN">
    <Desc id="EN">Generic DisplayLink Driver for ThinkPad USB 3.0 Ultra/Pro/Basic Dock - 10 (1607 or Later)</Desc>
  </Title>
  <DetectVersion type="Inf">
    <_PnPID><![CDATA[USB\VID_17E9&PID_433F&MI_00]]></_PnPID>
    <_PnPID><![CDATA[USB\VID_17E9&PID_4340&MI_00]]></_PnPID>
    <_PnPID><![CDATA[USB\VID_17E9&PID_431F&MI_00]]></_PnPID>
  </DetectVersion>
  <Summary default="EN" />
  <Severity type="2" />
  <Vendor>Lenovo</Vendor>
  **<ExtractCommand>dislink1012875.exe /VERYSILENT /DIR=%PACKAGEPATH% /EXTRACT="YES"</ExtractCommand>**
  <ReleaseDate>2022-10-19</ReleaseDate>
  <DiskSpaceNeeded>135386760</DiskSpaceNeeded>
  <Reboot type="3" />
  <Brand type="2" />
  <PackageType type="2" />
  <Install rc="0" type="cmd" default="EN">
    <Cmdline id="EN">%PACKAGEPATH%\Setup.exe -silent</Cmdline>
  </Install>
  <ManualInstall type="cmd" default="EN">
    <Cmdline id="EN">%PACKAGEPATH%\Setup.exe</Cmdline>
  </ManualInstall>

We see this during installing :

VERBOSE: Extracting package dislink1012875 ...
MaxInstallerRuntime of 00:20:00 will be enforced for this package because it appears NOT to be a BIOS or firmware update
**WARNING: The command or file '%PACKAGEPATH%\Setup.exe -silent' could not be found from '\\**********\filespace\sds\SCCMSTORE\MDM\Lenovo\Offline-Updater\Datastore\20S7S02200\PRD\**
dislink1012875' and was not run

Can you please first run the extraction?

Thanks in advance!

jantari commented 12 months ago

The ExtractCommand is already run first before installing.

Install-LSUpdate calls Expand-LSUpdate here:

https://github.com/jantari/LSUClient/blob/2860512288115899cc6333eaf462d74107297d92/public/Install-LSUpdate.ps1#L74

which runs the ExtractCommand if it exists (some packages don't have it):

https://github.com/jantari/LSUClient/blob/master/private/Expand-LSUpdate.ps1