Support in other languages: 
Reply
Ctrl-Alt-Del
derald
Posts: 5
Registered: ‎02-07-2011
Location: USA
0

Bios Scripting

Has anyone had any success with using VB Script to modify the BIOS settings on the M58p (7408)?  Per this pdf is should be possible to change BIOS settings such as setting passwords, and disabling USB ports.  I have tried multiple M58p models, and used the 0843 models.  With both models I haven't been able to get any of the example code to work.   The code will either error out, or it will return no values.   Using Scriptomatic (from Microsoft) I have looked at the WMI classes, and I don't see a LenovoBiosSettings as the document states should be on the system.  The systems are running the latest BIOS update, 5HKT52AUS. 

 

Does Lenovo require additional software to be installed on the systems for the ability to use scripts to control BIOS settings?  If so, where can I find this software?

 

Thank you for assistance in advance.

Fanfold Paper
pb33
Posts: 7
Registered: ‎02-03-2011
Location: germany
0

Betreff: Bios Scripting

Did you access the correct namespace root\wmi ?

Fanfold Paper
pb33
Posts: 7
Registered: ‎02-03-2011
Location: germany
0

Betreff: Bios Scripting

Forgot to say that you need local admin rights to access this class.

Ctrl-Alt-Del
derald
Posts: 5
Registered: ‎02-07-2011
Location: USA
0

Betreff: Bios Scripting

I used the scripts which came with the documentation.  I copied the code from the PDF and I also use the script that came in a zip download along with the PDF.  I am using a domain admin account (my own).  In the root\wmi, there isn't a LenovoBioSettings class to pull anything from.  This is according to scriptomatic.  Also, it seems as if nothing can be queried from that location, because if the script does run without any errors the return is "     =     ".  Nothing else.

Ctrl-Alt-Del
derald
Posts: 5
Registered: ‎02-07-2011
Location: USA
0

Betreff: Bios Scripting

I just checked with a local admin account, and it didn't work either. I get the following error:

C:\wmi_dtdeploymentguide\sample\ListAll.vbs(19, 1) (null): 0x80041010

This is using the example code that comes with the zip file.
Fanfold Paper
pb33
Posts: 7
Registered: ‎02-03-2011
Location: germany
0

Betreff: Bios Scripting

OK, try this snippet, and see if it works.

 

Set wmiRoot = GetObject("winmgmts:\\.\root\wmi")
Set wmiCol = wmiRoot.ExecQuery("SELECT * FROM Lenovo_BiosSetting")
For Each wmiItem In wmiCol
  If wmiItem.CurrentSetting <> "" Then
    sOut = sOut & wmiItem.CurrentSetting & vbCRLf
  End If
Next 
wscript.echo sOut

Ctrl-Alt-Del
derald
Posts: 5
Registered: ‎02-07-2011
Location: USA
0

Betreff: Bios Scripting

That doesn't work either. I get the same error. Based on some research, the 0x80041010 error means that it can't find the class within WMI. In this case it can't find the Lenovo_BiosSetting. I am starting to wonder if Lenovo just used a generic document and said it applied to all their BIOS but didn't test it.
Fanfold Paper
pb33
Posts: 7
Registered: ‎02-03-2011
Location: germany

Betreff: Bios Scripting

Yeah, i think you are right.

If you take a closer look at the PDF they "forgot" to list the supported model types.

It just reads like

"BIOS setup through WMI is supported on the following new
Thinkcentre products only:
·Thinkcentre M58/M58p"

 

.. followed by a lot of empty space.

Ctrl-Alt-Del
derald
Posts: 5
Registered: ‎02-07-2011
Location: USA
0

Betreff: Bios Scripting

Yes, I did notice that. There is another similar document for other models where it seems as if they only changed that part of the PDF.   I tried to force the BIOS from the M58P series but got an error.

 

Thanks for all the help.