Hi
In your sequence, can you run the hp software that update with a command line ? It would be the way to do it.
See there for a command line; HP BIOS Configuration Utility (BCU); https://ftp.ext.hp.com/pub/caps-softpaq/cmit/HP_BCU.html
HPBiosUpdRec [-s] [-pPasswordFile] [-fROMBINFile] [-a] [-h] [-?]
-s: Silent mode.
-p: Specify encrypted password file created with the HpqPswd utility.
-f: Specify ROM BIN file. Default is BIN file in same folder as exe.
-a: (Silent mode only) Always flash, ignore version comparison.
-h: Create HP_TOOLS partition if not present.
-?: Display usage.
-b: Suspend BitLocker if needed.
-r: Prevent autoreboot after the BIOS update.
And you need to run HPQPswd.exe to create the password file.
HpqPswd.exe /s /p"password123" /f"password.bin"