Dell 7.6 Computer Accessories User Manual


 
64 Sample Scripts and BIOS Settings
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_SMBIOSSettings"
strKeyValue = "0"
strPropName = "WakeupOnLan"
'*** Retrieve the instance of Dell_SMBIOSSettings
class (there should
'*** only be 1 instance).
Set objInstance =
GetObject("WinMgmts:{impersonationLevel=
impersonate}//" &_
strComputerName & "/" & strNameSpace & ":" &
strClassName & "=" & _
Chr(34) & strKeyValue & Chr(34))
strPropValue =
objInstance.Properties_.Item(strPropName).Value
'*** Set the value of WakeUpOnLan only if it is not
already '6' ("Enable
'*** for all NICs")
if strPropValue <> 6 then