利用VBS脚本修改联想笔记本BIOS密码的代码分享
利用VBS脚本修改联想笔记本BIOS密码的代码分享
发布时间:2016-12-28 来源:查字典编辑
摘要:这不科学!无意中找到的一些资料:vbs代码:复制代码代码如下:strComputer="."SetobjWMIService=GetObje...

这不科学!无意中找到的一些资料:

利用VBS脚本修改联想笔记本BIOS密码的代码分享1

vbs 代码:

复制代码 代码如下:

strComputer = "."

Set objWMIService = GetObject("winmgmts:" & strComputer & "rootWMI")

' Obtain an instance of the the class

' using a key property value.

Set objShare = objWMIService.Get("Lenovo_SetBiosPassword.InstanceName='ACPIPNP0C141_0'")

' Obtain an InParameters object specific

' to the method.

Set objInParam = objShare.Methods_("SetBiosPassword"). _

inParameters.SpawnInstance_()

' Add the input parameters.

objInParam.Properties_.Item("Parameter") = "test"

' Execute the method and obtain the return status.

' The OutParameters object in objOutParams

' is created by the provider.

Set objOutParams = objWMIService.ExecMethod("Lenovo_SetBiosPassword.InstanceName='ACPIPNP0C141_0'", "SetBiosPassword", objInParam)

' List OutParams

Wscript.Echo "Out Parameters: "

Wscript.echo "Return: " & objOutParams.Return

利用VBS脚本修改联想笔记本BIOS密码的代码分享2

文档下载【PDF】:montdeployguide

本人来自: http://www.enun.net/?p=1497

推荐文章
猜你喜欢
附近的人在看
推荐阅读
拓展阅读
相关阅读
网友关注
最新vbs学习
热门vbs学习
脚本专栏子分类