Users Guide

objInParam.sUrl = WScript.Arguments(1)
'*** Execute the method
'*** (执行方法)
Set ObjOutParam = objClass.ExecMethod_(strMethod, objInParam)
'*** Let the user know whether the method returned success or not
'*** (通知用户方法是否返回成功)
'*** Note: if return value is 0, it does not mean the system's BIOS has
'*** been flashed, it only means that the flash method was initiated
'*** successfully.
'*** (注:如果返回值为 0,并不意味着系统的 BIOS
'*** 已被闪速更新,仅指闪速方法已
'*** 成功初始化。)
If objOutParam.ReturnValue = 0 Then
WScript.Echo"Methodcompletedsuccessfully."
else
WScript.Echo"Methodfailed."
End If
'*** Sub used to display the correct usage of the script
'*** (Sub 用于显示脚本的正确用法)
Sub Usage()
Dim strMessage
strMessage = "incorrect syntax. 用户应该运行:" & vbCRLF & _
"cscript.exe//nologoSampleFlash.vbs<系统名称> <BIOS
标头文件 URL>"
WScript.Echo strMessage
End Sub
在下次重新启动时启PXE 启动
'**********************************************************************
'*** Name: SampleForcePXE.vbs
'*** (名称:SampleForcePXE.vbs)
'*** Purpose: To force a Dell OMCI client to boot to PXE on next reboot.
'*** (目的:强制 Dell OMCI 客户机在下次重新启动时启用 PXE)
'*** Usage: cscript.exe //nologo SampleForcePXE.vbs <systemname>
'*** (用法:cscript.exe //nologo SampleForcePXE.vbs <系统名称>)
'***
'*** This sample script is provided as an example only, and has not been
'*** tested, nor is warranted in any way by Dell; Dell disclaims any
'*** liability in connection therewith. Dell provides no technical
'*** support with regard to such scripting. For more information on WMI
'*** scripting, refer to applicable Microsoft documentation.
'*** (该样本脚本仅作为示例提供,未经过测试,也没有 Dell 任何形式的保证;
'*** 因此 Dell 否认对其承担任何
'*** 连接义务。 Dell 对该脚本不提供
'*** 任何技术支持。 关于 WMI
'*** 脚本的更多信息,请参阅相关的 Microsoft 说明文件。)
'**********************************************************************
Option Explicit
'*** Declare variables
'*** (声明变量)
Dim strNameSpace
Dim strComputerName
Dim strClassName
Dim strKeyValue
Dim objInstance
Dim strPropName
Dim strPropValue
'*** Check that the right executable was used to run the script
'*** and that all parameters were passed
'*** (检查使用正确的可执行文件运行脚本,
'*** 且所有参数都通过验证)
If (LCase(Right(WScript.FullName, 11)) = "wscript.exe" ) Or _
(Wscript.Arguments.Count<1)Then
CallUsage()
WScript.Quit
End If
'*** Initialize variables
'*** (初始化变量)
strNameSpace = "root/Dellomci"
strComputerName = WScript.Arguments(0)
strClassName = "Dell_Configuration"
strKeyValue = "Configuration"
strPropName = "ForcePXEOnNextBoot"
'*** Retrieve the instance of Dell_Configuration class (there should
'*** only be 1 instance).