Step 1: Export BIOS Settings into a file
Step 2: Open the exported file, change the BIOS Settings and save the file
Step 3: Import the changed BIOS Settings file
For exporting and importing of BIOS Settings is the HP Tool "BiosConfigurationUtility" required.
In order to export BIOS settings run: BiosConfigUtility64.exe /get:"[File Name]" (e.g. BiosConfigUtility64.exe /get:"BIOSPre.txt")
Note: The BIOS Password file BIOSPW.bin should be created by the HPQPswd.exe HP Tool.
By following this simple process I wanted to change the "Legacy Boot Order" BIOS Setting on an HP Model HP Elite Desk 800 G1 USDT computer. I exported the BIOS settings, changed the settinig ("Legacy Boot Order") and save it as a new file, and tried to import it back. Unufortunately by importing the file with the new "Legacy Boot Order" setting I got "Invalid Setting value return code 21" error.
I thought that the BIOS configuration file was not saved in the right format (UTF-8 without BOM) unfortunatelly that was not the case. After several tries the source of the issue was found. The issue was the extra "PnP Device #n" lines that was written for the "Legacy Boot Order" BIOS Settings. In the exported BIOS setting file this setting was exported as:
Legacy Boot Order
Hard Drive
Network Controller
USB Floppy/CD
ATAPI CD-ROM Drive
PnP Device #1
PnP Device #2
PnP Device #3
PnP Device #4
PnP Device #5
PnP Device #6
PnP Device #7
PnP Device #8
PnP Device #9
PnP Device #10
PnP Device #11
The new BIOS Setting that I tried to import was:
Legacy Boot Order
Network Controller
Hard Drive
USB Floppy/CD
ATAPI CD-ROM Drive
PnP Device #1
PnP Device #2
PnP Device #3
PnP Device #4
PnP Device #5
PnP Device #6
PnP Device #7
PnP Device #8
PnP Device #9
PnP Device #10
PnP Device #11
This did not work. In order to import the new "Legacy Boot Order" BIOS setting the PnP Device #n lines had to be removed first, so that the new BIOS File to import looked like:
Legacy Boot Order
Network Controller
Hard Drive
USB Floppy/CD
ATAPI CD-ROM Drive
After that the computer had to be restarted and the new Legacy Boot Order was set :)