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.

178 lines
5.3 KiB

  1. VERSION 5.00
  2. Begin VB.Form Dialog
  3. BorderStyle = 3 'Fixed Dialog
  4. Caption = "Operation Results"
  5. ClientHeight = 6015
  6. ClientLeft = 2760
  7. ClientTop = 3750
  8. ClientWidth = 11040
  9. LinkTopic = "Form1"
  10. MaxButton = 0 'False
  11. MinButton = 0 'False
  12. ScaleHeight = 6015
  13. ScaleWidth = 11040
  14. ShowInTaskbar = 0 'False
  15. Begin VB.ListBox ListDisabled
  16. Height = 2010
  17. ItemData = "ResultsDialog.frx":0000
  18. Left = 7680
  19. List = "ResultsDialog.frx":0002
  20. Sorted = -1 'True
  21. TabIndex = 8
  22. Top = 2280
  23. Width = 2175
  24. End
  25. Begin VB.ListBox ListMissingEnabled
  26. Height = 2010
  27. ItemData = "ResultsDialog.frx":0004
  28. Left = 4200
  29. List = "ResultsDialog.frx":0006
  30. Sorted = -1 'True
  31. TabIndex = 7
  32. Top = 2280
  33. Width = 2175
  34. End
  35. Begin VB.Frame Frame4
  36. Caption = "Unsuccessfully Disabled"
  37. Height = 2895
  38. Left = 7440
  39. TabIndex = 5
  40. Top = 1800
  41. Width = 2655
  42. End
  43. Begin VB.Frame Frame3
  44. Caption = "Missing Enabled"
  45. Height = 2895
  46. Left = 3960
  47. TabIndex = 4
  48. Top = 1800
  49. Width = 2655
  50. End
  51. Begin VB.Frame Frame2
  52. Caption = "Enabled"
  53. Height = 2895
  54. Left = 600
  55. TabIndex = 3
  56. Top = 1800
  57. Width = 2655
  58. Begin VB.ListBox ListEnabled
  59. Height = 2010
  60. ItemData = "ResultsDialog.frx":0008
  61. Left = 240
  62. List = "ResultsDialog.frx":000A
  63. Sorted = -1 'True
  64. TabIndex = 6
  65. Top = 480
  66. Width = 2175
  67. End
  68. End
  69. Begin VB.Frame Frame1
  70. Caption = "Status"
  71. Height = 735
  72. Left = 360
  73. TabIndex = 1
  74. Top = 240
  75. Width = 3135
  76. Begin VB.Label Status
  77. Caption = "Undefined"
  78. BeginProperty Font
  79. Name = "Verdana"
  80. Size = 9.75
  81. Charset = 0
  82. Weight = 700
  83. Underline = 0 'False
  84. Italic = 0 'False
  85. Strikethrough = 0 'False
  86. EndProperty
  87. Height = 375
  88. Left = 720
  89. TabIndex = 2
  90. Top = 240
  91. Width = 2175
  92. End
  93. End
  94. Begin VB.CommandButton CancelButton
  95. Cancel = -1 'True
  96. Caption = "Exit"
  97. Height = 375
  98. Left = 4680
  99. TabIndex = 0
  100. Top = 5400
  101. Width = 1215
  102. End
  103. Begin VB.Frame Frame5
  104. Caption = "Privilege Settings"
  105. Height = 3855
  106. Left = 360
  107. TabIndex = 9
  108. Top = 1320
  109. Width = 10215
  110. End
  111. End
  112. Attribute VB_Name = "Dialog"
  113. Attribute VB_GlobalNameSpace = False
  114. Attribute VB_Creatable = False
  115. Attribute VB_PredeclaredId = True
  116. Attribute VB_Exposed = False
  117. Private Sub CancelButton_Click()
  118. Unload Me
  119. End Sub
  120. Sub SetData(providerInfo As SWbemLastError)
  121. On Error Resume Next
  122. If Not providerInfo Is Nothing Then
  123. 'Look for the status property
  124. Dim property As SWbemProperty
  125. Set property = providerInfo.Properties_!Status
  126. If Err = 0 Then
  127. If property.Value = False Then
  128. Status.Caption = "Failed"
  129. Else
  130. Status.Caption = "Success"
  131. End If
  132. Else
  133. Status.Caption = "Unknown"
  134. Err.Clear
  135. End If
  136. 'Look for enabled privileges
  137. Set property = providerInfo.Properties_!EnabledPrivilegeList
  138. If Err = 0 Then
  139. For i = LBound(property.Value) To UBound(property.Value)
  140. ListEnabled.AddItem property(i)
  141. Next
  142. Else
  143. Err.Clear
  144. End If
  145. 'Look for missing enabled privileges
  146. Set property = providerInfo.Properties_!MissingEnabledPrivileges
  147. If Err = 0 Then
  148. For i = LBound(property.Value) To UBound(property.Value)
  149. ListMissingEnabled.AddItem property(i)
  150. Next
  151. Else
  152. Err.Clear
  153. End If
  154. 'Look for unsuccessfully disabled privileges
  155. Set property = providerInfo.Properties_!DisabledPrivilegesFoundEnabled
  156. If Err = 0 Then
  157. For i = LBound(property.Value) To UBound(property.Value)
  158. ListDisabled.AddItem property(i)
  159. Next
  160. Else
  161. Err.Clear
  162. End If
  163. End If
  164. End Sub