Hello,
I'm trying to deploy a BIOS update package on desktops and laptops.
I have two problems:
1) How can I include a variable in the package that takes into account the compatible machine model(s) (given that our fleet is relatively homogeneous)?
For example, the BIOS-1 package runs on our DELL Optiplex 3050 and 3070 laptops, and BIOS-2 on the DELL Latitude laptops.
2) Regarding laptops, is it possible to include an additional condition that considers whether the battery level is above XX%?
It's not so simple…
Thank you for your insights and examples (I'm not very proficient in Python).
Have a good day.
BIOS Update - Variables
Forum Rules
Community Forum Rules
* English support on www.reddit.com/r/wapt
* French community support is available on this forum
* Please prefix the topic title with [RESOLVED] if it is resolved.
* Please do not edit a topic that is tagged [RESOLVED]. Open a new topic referencing the old one.
* Specify the installed WAPT version, full version, and build number (2.2.1.11957 / 2.2.2.12337 / etc.) as well as the Enterprise/Discovery edition.
* Versions 1.8.2 and earlier are no longer supported. The only questions accepted regarding version 1.8.2 are related to upgrading to a supported version (2.1, 2.2, etc.).
* Specify the server OS (Linux/Windows) and version (Debian Buster/Bullseye - CentOS 7 - Windows Server 2012/2016/2019).
* Specify the OS of the administration/package creation machine and the machine with the problematic agent, if applicable (Windows 7/10/11/Debian 11/etc.).
* Avoid asking multiple questions when opening a topic, otherwise it may be ignored. If there are multiple topics, open separate topics, preferably one after the other and not all at the same time (i.e., do not spam the forum).
* Include code snippets, screenshots, and other images directly in the post. Links to Pastebin, Bitly, and other third-party sites will be systematically removed.
* As with any community forum, support is provided voluntarily by members. If you require commercial support, you can contact Tranquil IT's sales department at 02.40.97.57.55
Community Forum Rules
* English support on www.reddit.com/r/wapt
* French community support is available on this forum
* Please prefix the topic title with [RESOLVED] if it is resolved.
* Please do not edit a topic that is tagged [RESOLVED]. Open a new topic referencing the old one.
* Specify the installed WAPT version, full version, and build number (2.2.1.11957 / 2.2.2.12337 / etc.) as well as the Enterprise/Discovery edition.
* Versions 1.8.2 and earlier are no longer supported. The only questions accepted regarding version 1.8.2 are related to upgrading to a supported version (2.1, 2.2, etc.).
* Specify the server OS (Linux/Windows) and version (Debian Buster/Bullseye - CentOS 7 - Windows Server 2012/2016/2019).
* Specify the OS of the administration/package creation machine and the machine with the problematic agent, if applicable (Windows 7/10/11/Debian 11/etc.).
* Avoid asking multiple questions when opening a topic, otherwise it may be ignored. If there are multiple topics, open separate topics, preferably one after the other and not all at the same time (i.e., do not spam the forum).
* Include code snippets, screenshots, and other images directly in the post. Links to Pastebin, Bitly, and other third-party sites will be systematically removed.
* As with any community forum, support is provided voluntarily by members. If you require commercial support, you can contact Tranquil IT's sales department at 02.40.97.57.55
If it's for a Dell, it's best to use Dell Command Update, which will automatically select the correct drivers and BIOS for the model.
Regarding the battery level, it normally won't do anything if the machine isn't plugged in (at least not on Dell and HP machines).
Regarding the battery level, it normally won't do anything if the machine isn't plugged in (at least not on Dell and HP machines).
-
olaplanche
- Messages: 178
- Registration: January 26, 2017 - 11:11
Good morning,
Personally, I created one package per model. Otherwise, to answer your question:
1) It is possible to retrieve the machine model directly from the package using the following code, for example:
2) For the battery, you need to use the battery_percent function:
Sincerely,
Personally, I created one package per model. Otherwise, to answer your question:
1) It is possible to retrieve the machine model directly from the package using the following code, for example:
Code: Select all
wmi_data = wmi_info(keys=['Win32_ComputerSystem'])['Win32_ComputerSystem']
print(wmi_data['Model'])Code: Select all
battery = battery_percent()
print(battery)- Installed WAPT version: 2.6.0.16795 Enterprise
- Server OS: Linux / Debian Bookworm
- Administration/package creation machine OS: Windows 10
- Server OS: Linux / Debian Bookworm
- Administration/package creation machine OS: Windows 10
Thanks to both of you for your replies.
@florent2: Yes, that's pretty much what I thought, namely that the battery level is already checked in the Dell installer.
Actually, I should test it with a laptop connected via Wi-Fi to be sure.
@olaplanche
Thanks for the codes, they'll help.
Have a good day.
@florent2: Yes, that's pretty much what I thought, namely that the battery level is already checked in the Dell installer.
Actually, I should test it with a laptop connected via Wi-Fi to be sure.
@olaplanche
Thanks for the codes, they'll help.
Have a good day.
