Set A Single Bios Setting On The Local Computer - Lenovo ThinkPad T400 Deployment Manual

Bios setup using windows management instrumentation deployment guide
Hide thumbs Also See for ThinkPad T400:
Table of Contents

Advertisement

'
' List all BIOS settings
'
On Error Resume Next
Dim colItems
strComputer = "LOCALHOST"
Set objWMIService = GetObject("WinMgmts:" _
&"{ImpersonationLevel=Impersonate}!\\" & strComputer & "\root\wmi")
Set colItems = objWMIService.ExecQuery("Select * from Lenovo_BiosSetting")
For Each objItem in colItems
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, 256)
WScript.Echo StrItem + " = " + StrValue
End If
Next

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: cscript.exe SetConfig.vbs [Item] [Value]Example: cscript.exe SetConfig.vbs WakeOnLAN Disable
'
' Set specific BIOS Setting
'
On Error Resume Next
Dim colItems
If WScript.Arguments.Count <> 2 Then
WScript.Echo "SetConfig.vbs [setting] [value]"
WScript.Quit
End If
strRequest = WScript.Arguments(0) + "," + WScript.Arguments(1) + ";"
strComputer = "LOCALHOST"
Set objWMIService = GetObject("WinMgmts:" _
&"{ImpersonationLevel=Impersonate}!\\" & strComputer & "\root\wmi")
Set colItems = objWMIService.ExecQuery("Select * from Lenovo_SetBiosSetting")
For Each objItem in colItems
ObjItem.SetBiosSetting strRequest, strReturn
Next
WScript.Echo strRequest
WScript.Echo " SetBiosSetting: " + strReturn
If strReturn <> "Success" Then
WScript.Quit
End If
18
Lenovo BIOS Setup using Windows Management Instrumentation Deployment Guide
' Change as needed.
' Change as needed.

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents