Users Guide

'*** Nota: Si el valor de vuelta es 0, no significa que el BIOS del sistema
'***sehaactualizado,sólosignificaqueelmétododeactualizaciónse
'***iniciósatisfactoriamente.)
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
'*** (Subrutina utilizada para mostrar el uso correcto de la secuencia de comandos)
Sub Usage()
Dim strMessage
strMessage = "incorrect syntax. You should run: " & vbCRLF & _
"cscript.exe//nologoSampleFlash.vbs<nombredelsistema><URLdelarchivode
encabezadodelBIOS>"
WScript.Echo strMessage
End Sub
ActivacióndeinicioPXEenelsiguientereinicio
'**********************************************************************
'*** Name: SampleForcePXE.vbs
'*** (Nombre: SampleForcePXE.vbs)
'*** Purpose: To force a Dell OMCI client to boot to PXE on next reboot.
'*** (Objetivo: Forzar un equipo cliente de Dell OMCI a iniciar para PXE
'*** al siguiente reinicio.)
'*** Usage: cscript.exe //nologo SampleForcePXE.vbs <systemname>
'*** (Uso: cscript.exe //nologo SampleForcePXE.vbs <nombre del sistema>)
'***
'*** 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.
'*** (Esta muestra de secuencia de comandos se proporciona como ejemplo
'*** solamente y no ha sido probada, o garantizada de ninguna manera por Dell;
'***Dellrechazacualquierresponsabilidadrelacionadaconésta.Dellno
'***proporcionaasistenciatécnicaconrespectoaestetipodesecuencias
'***decomandos.Paraobtenermásinformaciónsobrelassecuenciasdecomandos
'***deWMI,consulteladocumentacióndeMicrosoftsobreeltema.)
'**********************************************************************
Option Explicit
'***Declarevariables(Declaraciónde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(Verificaqueseusó
'*** el archivo ejecutable correcto en la secuencia de comandos
'***yquetodoslosparámetrospasaron)
If (LCase(Right(WScript.FullName, 11)) = "wscript.exe" ) Or _
(Wscript.Arguments.Count<1)Then
CallUsage()
WScript.Quit
End If
'***Initializevariables(Inicializaciónde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).(Recuperalainstanciadelaclasedeconfiguración
'***Dell_Configurationclass[debeexistirsólo1instancia].)
Set objInstance = GetObject("WinMgmts:{impersonationLevel=impersonate}//" &_
strComputerName&"/"&strNameSpace&":"&strClassName&"="&_
Chr(34)&strKeyValue&Chr(34))
strPropValue = objInstance.Properties_.Item(strPropName).Value
'*** Set the new value for the property and save the instance, but only
'*** if the current value is not already 3 ('Enabled')
'*** (Establece el nuevo valor para la propiedad y guarda la instancia,
'***perosólosielvaloractualnohallegadoa3['Activado'])
If strPropValue <> 3 Then
objInstance.Properties_.Item(strPropName).Value=3