Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

27 lines
728 B

On Error Resume Next
Set Disk = GetObject ("winmgmts:{impersonationLevel=impersonate}!Win32_LogicalDisk=""C:""")
Set Keys = Disk.Path_.Keys
for each Key in Keys
WScript.Echo "Key has name", Key.Name, "and value", Key.Value
next
Set Names = CreateObject("WbemScripting.SWbemNamedValueSet")
Set Value = Names.Add ("fred", 25)
WScript.Echo "Named Value Set contains a value called", Value.Name, _
"which is set to", Value.Value
if Err <> 0 Then
WScript.Echo "**************"
WScript.Echo "TEST FAILED!"
WScript.Echo "**************"
WScript.Echo Err.Number, Err.Description
Err.Clear
else
WScript.Echo "**************"
WScript.Echo "TEST PASSED!!!"
WScript.Echo "**************"
End If