DELL's OMCI WMI Provider |
I could not find any documentation on DELLs site but if you search hard enough (I suggest on "DellOMCI") then you should find some examples. These should help:
Even using the DELL samples plus some other rare examples I managed to find I could not get it working consistently. The update would look like it worked and subsequent queries returned the new values but on booting and entering the BIOS settings screen some had updated but not all!
I have not had problems with this code:
'--- Init ------------------------------------------------------------------- on error resume next const wbemFlagReturnImmediately = &h10 const wbemFlagForwardOnly = &h20 const OnComputer = "." const WmiNameSpace = "\root\DellOMCI" const Dell_AutoOn_EveryDay_OptiPlexGx150 = 4 '??May vary between models? const Dell_AutoOn_EveryDay = 3 '?? const Dell_AutoOn_WeekDays = 4 '?? '--- Open WMI --------------------------------------------------------------- set oWMI = GetObject("winmgmts:\\" & OnComputer & WmiNameSpace) '--- Get access to wanted class objects ------------------------------------- set oSettings = oWMI.ExecQuery("SELECT * FROM Dell_SMBIOSsettings", "WQL", wbemFlagReturnImmediately + wbemFlagForwardOnly) '--- Loop though each matching object (for this class expect EXACTLY 1) ----- for each oSetting In oSettings '--- Dump values before change ------------------------------------------ DumpAutoStartSettings oSetting, "BEFORE UPDATE" '--- Make the changes --------------------------------------------------- oSetting.AutoOn = Dell_AutoOn_EveryDay_OPtiPlexGx150 oSetting.AutoOnHour = 6 '6:15am oSetting.AutoOnMinute = 15 '6:15am oSetting.Put_ 'Don't forget this! '--- Dump values after change ------------------------------------------- DumpAutoStartSettings oSetting, "AFTER UPDATE" next '--- Finished --------------------------------------------------------------- set oSetting = Nothing set oSettings = Nothing set oWMI = Nothing wscript.quit 0 '============================================================================ sub DumpAutoStartSettings(ByRef oObject, Title) '============================================================================ say Title say string(len(Title), "~") say "AutoOn : " & oSetting.AutoOn say "AutoOnHour : " & oSetting.AutoOnHour say "AutoOnMinute: " & oSetting.AutoOnMinute end sub '============================================================================ sub Say(What) '============================================================================ wscript.echo What end sub