texhex / BiosSledgehammer

Automated BIOS, ME, TPM firmware update and BIOS settings for HP devices
Apache License 2.0
127 stars 16 forks source link

Check return value of BIOS Updates #14

Closed texhex closed 7 years ago

texhex commented 7 years ago

Right now, we do not check the return code of a successful run, which means a "BAD COMMAND LINE" error is undetected. This should change and only 0 and 3010 should be considered "OK".

::: Preparing launch of update executable :::
Copy from [\\xxxxxx\Share\MDT\Scripts\BiosSledgehammer\Models\HP ProDesk 600 G1\BIOS-2.70\]
       to [C:\Users\Administrator\AppData\Local\Temp\BIOS-2.70\] ...
Trying to delete [*.log] in target folder
Starting:
  C:\Users\Administrator\AppData\Local\Temp\BIOS-2.70\HPQFlash\hpqFlash.exe
  -s -r
  Done, return code is 259
--- Output ---
--------------
  Waiting 10 seconds before checking if the process is still running...
   [hpqFlash] is no longer running, waiting 5 seconds to allow cleanup...
  Start of [C:\Users\Administrator\AppData\Local\Temp\BIOS-2.70\HPQFlash\hpqFlash.exe] done
Checking for first file matching [*.log] in [C:\Users\Administrator\AppData\Local\Temp\BIOS-2.70]...
***** ::BEGIN:: C:\Users\Administrator\AppData\Local\Temp\BIOS-2.70\HPQFlash\hpqFlash.log *****
2017/05/29 07:10:31.367|00000420|Information|ChpqFlashApp::InitInstance|
2017/05/29 07:10:31.367|00000420|Information|ChpqFlashApp::InitInstance|--- START NEW HPQFLASH SESSION, HPQFLASH version 4.50.1.1 ---
2017/05/29 07:10:31.367|00000420|Information|ChpqFlashApp::CPQFProcessCmdLineArgs|Command line = -s -r
2017/05/29 07:10:31.367|00000420|Information|CPQMessageBox|Error Code  0x00000115  INVALID_CMDLINE_PARAMETERS

2017/05/29 07:10:31.383|00000420|Information|ChpqFlashApp::ExitInstance|Exit hpqFlash:  Return Code = 0x103
2017/05/29 07:10:31.383|00000420|Information|ChpqFlashApp::ExitInstance|--- END HPQFLASH SESSION ---
***** ::END:: C:\Users\Administrator\AppData\Local\Temp\BIOS-2.70\HPQFlash\hpqFlash.log *****
::: Launching update executable finished :::
texhex commented 7 years ago

Check now active in commit d159db74931d864f87073eea3ab207ccb0564de7, requires testing.

texhex commented 7 years ago

Testing done, no issues found. Released in v3.2.4.

Closing issue.