duncanchaos Posted August 8, 2013 Share Posted August 8, 2013 (edited) I am a System Engineer with Toshiba and we are implementing the ability to change our BIOS settings via WMI.on some of our business class laptop models. I have the full documentation on what fields can be modified and have plenty of VBS and Powershell sample code that is working. I am very experienced with AutoIT and would like to be able to use AutoIT do handle these tasks. Using AutoIT the WMI queries are working without issue but AutoIT does not seem to be able to handle the syntax required to input data to a WMI field. Here is a snip of the VBS code to change a setting via WMI: For Each objItem in colItems objItem.SetBiosSetting strInParamValue, strReturn Next The strinParamValue variable contains the setting name and value. Here is the corresponding AutoIT code: For $objItem in $colItem $Return = $objItem.SetBiosSetting $InParamValue Next AutoIT rejects the variable $inParamValue as incorrect syntax. Does anyone know how to get AutoIT to feed the string contained in the variable back to the call so that the BIOS setting is changed? Is AutoIT incapable of doing this? Thanks Edited August 8, 2013 by duncanchaos Link to comment Share on other sites More sharing options...
FireFox Posted August 8, 2013 Share Posted August 8, 2013 Hi,Something like this I guess :$objItem.SetBiosSetting($strInParamValue, $strReturn)Br, FireFox. Link to comment Share on other sites More sharing options...
Moderators JLogan3o13 Posted August 8, 2013 Moderators Share Posted August 8, 2013 (edited) Something like this: $strInParamValue = "" $strReturn = "" For $obj in $colItems $obj.SetBiosSetting($strInParamValue, $strReturn) Next Well hell - too slow Edited August 8, 2013 by JLogan3o13 "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum! Link to comment Share on other sites More sharing options...
FireFox Posted August 8, 2013 Share Posted August 8, 2013 I'm not going to be defeated again JLogan3o13 1 Link to comment Share on other sites More sharing options...
duncanchaos Posted August 8, 2013 Author Share Posted August 8, 2013 Thanks guys. I spent too long searching the forum for this and you guys nailed it in 10 minutes. I have tested and your syntax works. I really appreciate the info! JD Duncan Senior Systems Engineer Toshiba America Information Systems Link to comment Share on other sites More sharing options...
Moderators JLogan3o13 Posted August 8, 2013 Moderators Share Posted August 8, 2013 If you have other WMI related questions, I would highly suggest taking a look at AutoIt Script-o-Matic in the downloads section. Written by our very own Overlord Jon, it will show you the code for most everything you would like to do. "Profanity is the last vestige of the feeble mind. For the man who cannot express himself forcibly through intellect must do so through shock and awe" - Spencer W. Kimball How to get your question answered on this forum! Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now