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.

25 lines
898 B

  1. '***************************************************************************
  2. 'This script tests the manipulation of context values, in the case that the
  3. 'context value is a not an array type
  4. '***************************************************************************
  5. Set Context = CreateObject("WbemScripting.SWbemNamedValueSet")
  6. On Error Resume Next
  7. Context.Add "n1", 327
  8. WScript.Echo "The initial value of n1 is [327]:", Context("n1")
  9. 'Verify we can report the context value
  10. v = Context("n1")
  11. WScript.Echo "By indirection n1 has value [327]:",v
  12. 'Verify we can report the value directly
  13. WScript.Echo "By direct access n1 has value [327]:", Context("n1")
  14. 'Verify we can set the value of a single named value
  15. Context("n1") = 234
  16. WScript.Echo "After direct assignment n1 has value [234]:", Context("n1")
  17. if Err <> 0 Then
  18. WScript.Echo Err.Description
  19. Err.Clear
  20. End if