Function ................................................................................................................................................... 2
Changing the boot order ................................................................................................................................ 11
The purpose of this guide is to explain how to modify BIOS
settings, boot order using Windows Management Instrumentation
(WMI) through the Lenovo client-management interface. This
guide is intended for skilled IT administrators who are familiar
with configuring BIOS settings on computers in their
organizations.
This guide is provided in a ZIP file package that contains this
deployment guide as well as Visual Basic sample scripts to use
when configuring BIOS settings.
This deployment guide is developed for IT professionals to assist
with the unique challenges that they encounter. If you have
suggestions or comments, communicate with your Lenovo
authorized representative. To learn more about the technologies that
can help you lower the total cost of ownership and to check for
periodic updates to this guide, visit the following Web site:
www.lenovo.com/support
®
@Copyright Lenovo 2011
Page 8
Page 9
1
Chapter 1. Overview
IT administrators are always looking for easier ways to manage
client computer BIOS settings, which include hardware settings,
and the boot order. The Lenovo BIOS WMI interface provides a
simplified way to change these settings. Lenovo has developed a
BIOS interface that can be manipulated through Windows
Management Instrumentation (WMI). The Lenovo BIOS WMI
interfaceenables IT administrators to make queries on current
BIOS settings, restore settings to their factory defaults, change
single settings, reset or change passwords, and modify the boot
order either at client computers or remotely.
Using Windows Management Instrumentation
WMI is provided as a standard feature in most Windows
systems. It provides a powerful set of functions, such as
query-based information retrieval and event notification, which
enables users to manage both local and remotecomputers. The
Lenovo BIOS WMI interface extends the capabilities of WMI to
allow management of BIOS settings.
®
operating
The following illustration shows how WMI can be used to access
Lenovo BIOSsettings.
WMI uses Windows Script host (WSH) to interpret scripts. You can
write your scripts in either Windows Visual Basic Scripting Edition
(VBScript) or JavaScript.
Key benefits
The Lenovo BIOS WMI interface provides the following benefits:
@Copyright Lenovo 2011
Page 10
2
Function
·Flexible BIOS configuration, including the ability to change a
single BIOS setting or all BIOS settings
·Bios password management , including update Administrator
passwords, power-on passwords(POP), hard disk
drive(HDD)passwords
·No dependency on a specific BIOS level
Environment
·Remote or local capabilities
·Support of unattended operations
·No software installation, including managed object format (MOF),
required
·Replaces DOS-based BIOS configuration tools
Interface
·Easy to adopt for various management servers
·Replaces current SMI interface
·Common interface for different products
Supported computers
BIOS setup through WMI descripted in thi s document is
supported on the following new Thinkcentre products only:
·Thinkcentre M91/M91p
Lenovo BIOS Windows Management Instrumentation Interface Deployment Guide for Desktop
Page 11
3
Chapter 2. Script Classes and Parameter
This chapter contains WMI implementation details for configuring
BIOS settings.
Configuring BIOS settings
The following interface details can be used to access Lenovo BIOS
settings.
·Namespace: "\root\WMI"
·Base Class: "Lenovo_BIOSElement"
·Interface details (see Table 1)
Table 1. Interface Details
@Copyright Lenovo 2011
Page 12
4
Class Name
Type
Parameter/Return
Example
Lenovo_BiosSetting
Query
CurrentSetting:”Item,Value”
“Wake Up on LAN,
Eanbled”
Lenovo_SetBiosSetting
Method
“Item,Value;”
“Wake Up on
LAN,Disabled;”
Lenovo_SaveBiosSettings
Method
“Password,Encoding,KbdLa
ng;”
“pswd,ascii,us;“
Lenovo_DiscardBios
Settings
Method
“;”
“;”
Lenovo_LoadDefault
Settings
Method
“;”
“;”
Lenovo_BiosPasswordSettings
Query
PasswordMode:”Value”
-0:Legacy Mode
-Others: Reserved
PasswordState:”Value”
-BIT0=1: User password is
installed
-BIT1=1:Admin password is
installed
-BIT2=1:Hard disk
passwords are installed
MinLength:”Value”
-1:always one byte
MaxLength:”Value”
-64:always 64 byte
SupportedKeyboard:”Value
”
-BIT0=1:Support US
keyboard
-BIT1=1:Support French
keyboard
-BIT2=1:Support German
keyboard
SupportedEncodings:”Value
”
-BIT0=1: support ASCII
password input
-BIT1=1:support scancode
password input
Port0HardDiskPasswordStat
e:”Value”
-BIT0=1:User hard disk
password is installed
-BIT1=1:Master hard disk
password is installed
Port1HardDiskPasswordStat
e:”Value”
Port2HardDiskPasswordStat
e:”Value”
Port3HardDiskPasswordStat
e:”Value”
Port4HardDiskPasswordStat
e:”Value”
Port5HardDiskPasswordStat
e:”Value”
PasswordMode:1
PasswordState:0
MinLength:1
MaxLength:64
SuportedKeyboard:7
SupportedEncodings:3
Port0HardDiskPasswordS
tate:00
Port1HardDiskPasswordS
tate:00
Port2HardDiskPasswordS
tate:00
Port3HardDiskPasswordS
tate:00
Port4HardDiskPasswordS
tate:00
Port5HardDiskPasswordS
tate:00
Lenovo_SetBiosPassword
Method
“PasswordType,CurrentPass
word,
NewPassword,Encoding,Kb
“pop,oldpop,
newpop,ascii,us;”
Lenovo BIOS Windows Management Instrumentation Interface Deployment Guide for Desktop
Page 13
5
Return types
Return Type
Description
Success
Operation completed successfully.
Not
Supported
The feature is not supported on this system.
Invalid
Parameter
The item or value provided is not valid.
Access
Denied
The change could not be made due to an authentication
problem. If a supervisor password exists, the correct supervisor
password must be provided.
System Busy
BIOS changes have already been made that need to be
committed. Reboot the system and try again
Parameter
Description
Possible selections
Parameter 1
Current password
·“abc” - raw ascii character
·“1e302e” – scancode
Parameter 2
Password encoding
·“ascii”
·“scancode”
Parameter 3
Keyboard languages
(valid only if encoding is ″ascii″)
Lenovo BIOS Windows Management Instrumentation Interface Deployment Guide for Desktop
Page 17
9
Controller&
USB Support
Error Boot Sequence
SATA
Controller&
Onboard
Ethernet
Controller&
USB Support
Manufacturing Boot
Sequence
SATA
Controller&
Onboard
Ethernet
Controller&
USB Support
Boot Mode
“Auto”,”UEFI”,”Legacy”
N
Quick Boot
“Enabled”,”Disabled”
N
Boot Up Num-Lock Status
“On”,”Off”
N
Keyboardless Operation
"Disabled","Enabled"
N
Option Keys Display
"Disabled","Enabled"
N
Option Keys Display Style
“Normal”,”Legacy”
N
Startup Device Menu
Prompt
“Enabled”,”Disabled”
N
Serial Number Style
"Legacy
Style","MTM&SN-1","MTM&SN-2","1
S-MTM-SN"
N
Note:
for “Serial Number Style”:
Legacy Style means display the legacy seven digit serial number
MTM&SN-1 means concatenation of Machine Type with Serial Number
(mmmmsssssss)
MTM&SN-2 means concatenation of Machine Type/Model and Serial Number
(mmmmmmmsssssss)
1S-MTM-SN means concatenation of "1S", Machine Type/Model and Serial Number
(1Smmmmmmmsssssss)
@Copyright Lenovo 2011
Page 18
Page 19
11
Chapter 3. Typical Usage
Through WMI, you can configure BIOS settings in the
following ways:
·List BIOS settings
·Change BIOS settings
·Change the boot order (sometimes referred to as the startup
sequence)
·Load default BIOS settings
Listing current BIOS settings
For a list of all available BIOS settings that can be changed
through WMI on a specific computer, use the
Lenovo_BiosSetting class (see “List all BIOS settings on the
local computer” on page 16 and “List all BIOS settings on a
remote computer” on page 18 for sample scripts).
See Table 3 on page 4 for a list of available BIOS settings.
Changing BIOS settings
To change a BIOS setting, complete the following steps:
1. Identify the BIOS setting you want to change using the
Lenovo_BiosSetting class (see “List all BIOS settings on the local
computer” on page 16 and “List all BIOS settings on a remote
computer” on page 18 for sample scripts).
2. Identify the value to which the setting will be changed.
Note: See Table 4 on page 4 for a list of available values for a
particular setting.
3. Change the BIOS setting to the desired value using the
Lenovo_SetBiosSetting class, then use the Lenovo_SaveBiosSetting
class to save the settings (see “Set a single BIOS setting on the local
computer” on page 16 and “Set a single BIOS setting on a remote
computer” on page 17 for sample scripts).
Note: BIOS settings and values are case sensitive.
After making changes to the BIOS settings, you must reboot the
computer before the changes will take effect.
Changing the boot order
To change the boot order, complete the following steps:
1. Determine the current setting for “BootOrder” by using the
@Copyright Lenovo 2011
Page 20
12
Lenovo_BiosSetting class (see “List all BIOS settings on the local
Parameter
Description
Possible seletctions
Parameter 1
Password type
string
“pap”:Administrator password
“pop”:Power-on password
“uhdp0”: User password of HDD0
“mhdp0”:Master pasword of HDD0
“uhdp1”:User password of HDD1
“mhdp1”:Master password of HDD1
“uhdp2”:User password of HDD2
“mhdp2”:Mater password of HDD2
“uhdp3”:User password of HDD3
“mhdp3”:Master password of HDD3
“uhdp4”:User password of HDD4
“mhdp4”:Master password of HDD4
“uhdp5”:User password of HDD5
“mhdp5”:Master password of HDD5
Parameter 2
Current
password
string
“abc”:raw ascii character
“1e302e”:scancode
Parameter 3
New password
string
“def”:raw ascii character
“201221”:scancode
Parameter 4
Password
encoding
“ascii”
“Scancode”
Parameter 5
Keyboard
·“us″- English US, English UK,
computer” on page 16 and “List all BIOS settings on the remote
computer” on page 18for sample scripts).
2. To set a new boot order, use the Lenovo_SetBiosSetting class,
then use the Lenovo_SaveBiosSetting class to save the settings
(see “Set a single BIOS setting on the local computer” on page 16
and “Set a single BIOS setting on a remote computer” on page 17
for sample scripts). Specify a new boot order by
devices in order, separated by colons. Devices that are not
specifiedare excluded from the boot order. In the following
example, the CD/DVD drive is the first boot device and hard
disk drive is the second boot device and so on.
To restore default BIOS settings, use the Lenovo_LoadDefaultSettings class,
and then use the Lenovo_SaveBiosSettings class to save the BIOS changes
(see sample scripts).
listing the
boot
Changing an existing hardware password
To update a password, specify a password type and format the
password. The format for password parameters is ″pap,abc,def,ascii,us″
with descriptions
local computer when a Administrator password exists” on page 20 and
“Set a Administrator password on a remote computer when a
Administrator password exists” on page 21 for sample scripts).
Table 5. Password parameters format, changing existing hardware password
in Table
5 (see “Set a Administrator password on the
Lenovo BIOS Windows Management Instrumentation Interface Deployment Guide for Desktop
The following WMI limitations exist for BIOS setup:
·Administrator password, POP,HDP and the item”Hardware Password
Manager” cannot be changed simutaneously during one power cycle. If
you want to change these settings, you must reboot the system after
changing one of them.
·A password cannot be set using this method when one does not already
exist. Passwords can only be updated or cleared.
·When user try to batch update BIOS settings, make sure that the related
item of each item is in correct state, because once one item’s related item is
Disabled or with special setting, this item will be hidden and can not be
updated through WMI. Please reference
between items.
Table 4
for detail relationship
@Copyright Lenovo 2011
Page 22
Page 23
15
Chapter 4. Security
WMI-based administration scripts operating over a remote connection send
data over the network in clear text by default. You can enhance security by
modifying WMI-based administration scripts to establish an encrypted
remote connection as follows:
1. Set an impersonation level of ″impersonate″
2. Set an authentication level of ″pktPrivacy″
See Appendix A, “Sample Visual Basic scripts for configuring BIOS
settings,” on page 15 for sample scripts used to implement WMI-based
administration scripts that include these parameters for encryption.
@Copyright Lenovo 2011
Page 24
Page 25
17
Appendix A. Sample Visual Basic scripts for
configuring BIOS settings
The Visual Basic command line scripts in the ZIP file are examples
that you may find helpful when configuring BIOS settings.
The scripts in the ZIP file can be used as-is on Windows XP ,
Windows Vista or Wi ndows 7 to modify BIOS settings on your
Lenovo computer. The scripts can be executed on a command
prompt using the cscript.exe utility. On Windows Vista, you must
run the scripts from an administrator command prompt.
Note: The scripts in this appendix are for reference only. To copy
and paste scripts, use the scripts in the ZIP file. Pay attention to that
symbol “;” is treated as the end of paramter in script, so make sure
each method input paramter in script will end with “;”
Restore default settings
Use the example scripts in the ZIP file as templates to restore default
settings on the local computer.
Syntax:
Example:
‟
‟ Load default BIOS settings
‟
On Error Resume Next
Dim colItems
strComputer = “LOCALHOST”„Change as needed
Set objWMIService = GetObject(“WinMgmts:” _
&"{ImpersonationLevel=Impersonate}!\\" & strComputer _
&"\root\wmi")
Set colItems = objWMIService.ExecQuery("Select * from
Lenovo_LoadDefaultSettings")
strReturn = "error"
For Each objItem in colItems
Next
WScript.Echo " LoadDefaultSettings: " + strReturn
If strReturn < > "Success" Then
End If
Set colItems = objWMIService.ExecQuery("Select * from
Lenovo_SaveBiosSettings")
strReturn = "error"
For Each objItem in colItems
Next
WScript.Echo " SaveBiosSettings: " + strReturn
cscript.exe LoadDefaults.vbs
cscript.exe LoadDefaults.vbs
ObjItem.LoadDefaultSettings ";", strReturn
WScript.Quit
ObjItem.SaveBiosSettings ";", strReturn
@Copyright Lenovo 2011
Page 26
18
List all BIOS settings on the local computer
Use the sample scripts in the ZIP file as templates to list all
BIOS settings and values on the local computer.
Syntax:
Example:
‟
‟ List all BIOS settings
‟
On Error Resume Next
Dim colItems
strComputer = "LOCALHOST" ‟ Change as needed.
Set objWMIService = GetObject("WinMgmts:" _
&"{ImpersonationLevel=Impersonate}!\\" & strComputer _
&"\root\wmi")
Set colItems = objWMIService.ExecQuery("Select * from
Lenovo_BiosSetting")
For Each objItem in colItems
End If
Next
cscript.exe ListAll.vbs
cscript.exe ListAll.vbs
If Len(objItem.CurrentSetting) > 0 Then
Setting = ObjItem.CurrentSetting
StrItem = Left(ObjItem.CurrentSetting,InStr(
ObjItem.CurrentSetting, “,”)-1)
StrValue = Mid(ObjItem.CurrentSetting,InStr(
ObjItem.CurrentSetting, “,”)-1)
WScript.Echo StrItem + " = " + StrValue
Set a single BIOS setting on the local computer
Use the sample scripts in the ZIP file as templates to set a single
BIOS setting on the local computer.
Syntax
Example
‟
‟ Set specific BIOS Setting
‟
On Error Resume Next
Dim colItems
If WScript.Arguments.Count < > 2 Then
End If
strRequest = WScript.Arguments(0) + "," + WScript.Arguments(1) +
";"
strComputer = "LOCALHOST" ‟ Change as needed.
Set objWMIService = GetObject("WinMgmts:"_
&"{ImpersonationLevel=Impersonate}!\\" & strComputer _
&"\root\wmi")
Set colItems = objWMIService.ExecQuery("Select * from
Lenovo_SetBiosSetting")
For Each objItem in colItems
Next
WScript.Echo strRequest
: cscript.exe SetConfig.vbs [Item] [Value]
: cscript.exe SetConfig.vbs “Wake Up on LAN” Disabled
Use the sample scripts in the ZIP file as templates to list all
BIOS settings and values on a remote computer.
Syntax:
Example:
‟
‟ List all BIOS settings
‟
On Error Resume Next
Dim colItems
If WScript.Arguments.Count <> 1 Then
End If
strComputer = WScript.Arguments(0)
Set objWMIService = GetObject("WinMgmts:" _
&"{ImpersonationLevel=Impersonate," _
&"authenticationLevel=pktPrivacy}!\\" _
& strComputer & "\root\wmi")
Set colItems = objWMIService.ExecQuery("Select * from
Lenovo_BiosSetting")
For Each objItem in colItems
Use the sample scripts in the ZIP file as templates to set a single
BIOS setting on a remote computer.
Syntax:
[Hostname]
Example:
Disabled mattdev-c5
‟
‟ Set specific BIOS Setting
Lenovo BIOS Windows Management Instrumentation Interface Deployment Guide for Desktop
cscript.exe
cscript.exe
SetConfigRemote.vbs [Item] [Value]
SetConfigRemote.vbs
“Wake Up on LAN”
Page 29
21
‟
On Error Resume Next
Dim colItems
If WScript.Arguments.Count < > 3 Then
WScript.Echo "SetConfigRemote.vbs [setting] [value] [hostname]"
WScript.Quit
End If
Set a single BIOS setting on a remote computer when
a Administrator password exists
Use the sample scripts in the ZIP file as templates to set a single
BIOS setting on a remote computer.
Syntax:
[Value] [Password+Encoding] [Hostname]
Example:
LAN”
‟
‟ Set specific BIOS Setting
‟
On Error Resume Next
Dim colItems
If WScript.Arguments.Count < > 4 Then
WScript.Echo "SetConfigPasswordRemote.vbs [Item] [value]
[password+encoding] [hostname]"
WScript.Quit
Set a Administrator password on the local computer
when a Administrator password exists
Use the sample scripts in the ZIP file as templates to set a single
BIOS setting on a remote computer.
Note: You cannot set a password if one does not already exist.
Syntax:
password] [encoding]
Example:
“ascii,us”
‟
‟ Update Administrator password
‟
On Error Resume Next
Dim colItems
If WScript.Arguments.Count < > 3 Then
WScript.Echo "SetAdminPassword.vbs [oldpassword] [newpassword]
[encoding]"
WScript.Quit
End If
strRequest=“pap,”+WScript.Arguments(0)+","+ WScript.Arguments(1)
+ ","Wscript.Arguments(2)+”;”
strCompter = “LOCALHOST” „change as needed
Set objWMIService = GetObject("WinMgmts:" _
cscript.exe
cscript.exe
SetAdminPassword.vbs [old password] [new
SetAdminPassword.vbs
oldpass
newpass
Lenovo BIOS Windows Management Instrumentation Interface Deployment Guide for Desktop
Set a Administrator password on a remote computer
when a Administrator password exists
Use the sample scripts in the ZIP file as templates to set a single
BIOS setting on a remote computer.
Note: You cannot set a password if one does not already exist.
Syntax:
[new password] [encoding] [hostname]
Example:
“ascii,us” mattdev-c5
‟
‟ Update Administrator password
‟
On Error Resume Next
Dim colItems
If WScript.Arguments.Count < > 4 Then
WScript.Echo "SetAdminPasswordRemote.vbs [oldpassword]
[newpassword] [encoding] [hostname]"
WScript.Quit
End If
Lenovo may not offer the products, services, or features discussed
in this document in all countries. Consult your local Lenovo
representative for information on the products and services
currently available in your area. Any reference to a Lenovo
product, program, or service is not intended to state or imply that
only that Lenovo product, program, or service may be used. Any
functionally equivalent product, program, or service that does not
infringe any Lenovo intellectual property right may be used
instead. However, it is the
verify the operation of any other product, program, or service.
Lenovo may have patents or pending patent applications
covering subject matter described in this document. The
furnishing of this document does not give you any license to
these patents. You can send license inquiries, in writing, to:
Lenovo (United States), Inc
1009 Think Place
Building One
Morrisville, NC 27560
USA
Attention: Lenovo Director of Licensing
LENOVO GROUP LTD. PROVIDES THIS PUBLICATION “ASIS”
WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR
IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY
OR FITNESS FOR A PARTICULAR PURPOSE. Some jurisdictions
do not allow disclaimer of express or implied warranties in certain
transactions, therefore, this statement may not apply to you.
This information could include technical inaccuracies or
typographical errors. Changes are periodically made to the
information herein; these changes will be incorporated in new
editions of the publication. Lenovo may make improvements
and/or changes in the product(s) and/or the program(s) described
in this publication at any time without notice.
The products described in this document are not intended for use
in implantation or other life support applications where
malfunction may result in injury or death to persons. The
information contained in this document does not affect or change
Lenovo product specifications or warranties. Nothing in this
document shall operate as an express or implied license or
indemnity under the intellectual property rights of Lenovo or
third parties. All information contained in this document was
obtained in specific environments and is presented as an
illustration. The result obtained in other operating environments
may vary.
Lenovo may use or distribute any of the information you
supply in any way it believes appropriate without incurring
any obligation to you.
user
’s responsibility to evaluate and
@Copyright Lenovo 2011
Page 34
26
Trademarks
Any references in this publication to non-Lenovo Web sites are
provided for convenience only and do not in any manner serve as
an endorsement of those Web sites. The materials at those Web sites
are not part of the materials for this Lenovo product, and use of
those Web sites is at your own risk.
The following terms are trademarks of Lenovo in the
United States, other countries, or both:
Lenovo
the Lenovo logo
Thinkcentre
ThinkVantage
Microsoft, Windows, Windows Vista, and Active Directory are
trademarks or registered trademarks of Microsoft Corporation
in the United States, other countries, or both.
Other company, product, or service names may be trademarks or
service marks of others.
Lenovo BIOS Windows Management Instrumentation Interface Deployment Guide for Desktop
Loading...
+ hidden pages
You need points to download manuals.
1 point = 1 manual.
You can buy points or you can get point for every manual you upload.