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.

39 lines
942 B

  1. <job id="Cluster Private Properties">
  2. <reference guid="{f2e606e0-2631-11d1-89f1-00a0c90d061e}" version="1.0" />
  3. <script language="VBScript">
  4. Option Explicit
  5. Dim oPrivProp, oNewProp
  6. Dim value
  7. Dim oCluster
  8. Dim oPrivProps
  9. Dim varSC
  10. Set oCluster = CreateObject("MSCluster.Cluster")
  11. oCluster.Open ("galenb-clus")
  12. MsgBox oCluster.Name
  13. value = "This is a test string for added private property"
  14. set oPrivProps = oCluster.Resources.Item( "TestRes" ).PrivateProperties
  15. set oPrivProp = oPrivProps.CreateItem( "8TestPrivProperty", value )
  16. If Err.Number <> 0 Then
  17. MsgBox "ClusProperties.CreateItem failed:" & Err.Description
  18. End If
  19. if oPrivProps.Modified then
  20. varSC = oPrivProps.SaveChanges
  21. end if
  22. 'oPrivProps.UseDefaultValue "8TestPrivProperty"
  23. set oNewProp = oPrivProps.Item( "8TestPrivProperty" )
  24. MsgBox "PropName is " & oNewProp.Name
  25. </script>
  26. </job>