02-07-2011 07:17 AM
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.
02-07-2011 07:35 AM
Did you access the correct namespace root\wmi ?
02-07-2011 07:39 AM
Forgot to say that you need local admin rights to access this class.
02-07-2011 09:52 AM
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.
02-07-2011 09:58 AM
02-08-2011 01:27 AM
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
02-08-2011 05:53 AM
02-09-2011 11:12 AM
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.
02-09-2011 01:59 PM
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.