Lenovo ThinkPad T420si (English) BIOS Setup using Windows Management Instrumen - Page 30
supervisor, password, local, computer, exists
View all Lenovo ThinkPad T420si manuals
Add to My Manuals
Save this manual to your list of manuals |
Page 30 highlights
strRequest = WScript.Arguments(0) + "," + WScript.Arguments(1) + "," + WScript.Arguments(2) + ";" strComputer = WScript.Arguments(3) Set objWMIService = GetObject("WinMgmts:" _ &"{ImpersonationLevel=Impersonate," _ &"authenticationLevel=pktPrivacy}!\\" _ & 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 Set colItems = objWMIService.ExecQuery("Select * from Lenovo_SaveBiosSettings") strReturn = "error" For Each objItem in colItems ObjItem.SaveBiosSettings WScript.Arguments(2) + ";", strReturn Next WScript.Echo strRequest WScript.Echo " SaveBiosSettings: " + strReturn Set a supervisor password on the local computer when a supervisor password exists Use the sample scripts in the ZIP file as templates to set a supervisor password on the local computer when a supervisor password exists. Note: You cannot set a supervisor password if one does not already exist. Syntax: cscript.exe SetSupervisorPassword.vbs [Old Password] [New Password] [encoding] Example: cscript.exe SetSupervisorPassword.vbs oldpass newpass ascii,us ' ' Update Admnistrator Password ' On Error Resume Next Dim colItems If WScript.Arguments.Count 3 Then WScript.Echo "SetSupervisorPassword.vbs [old Password] [new Password] [encoding]" WScript.Quit End If 22 Lenovo BIOS Setup using Windows Management Instrumentation Deployment Guide