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.

49 lines
893 B

  1. <%@ LANGUAGE="VBSCRIPT"%>
  2. <HTML>
  3. <HEAD>
  4. <TITLE>Scripting Test 1</TITLE>
  5. </HEAD>
  6. <BODY>
  7. <%
  8. on error resume next
  9. Set Locator = CreateObject("WbemScripting.SWbemLocator")
  10. Set Service = locator.connectserver ("ludlow")
  11. if Err = 0 then
  12. Set Disk = Service.Get ("Win32_LogicalDisk")
  13. Set Path = Disk.Path_
  14. Disk.Security_.impersonationLevel = 3
  15. Set Disks = Disk.Instances_
  16. %>
  17. <P>Path of object is <%=Path.DisplayName%></P>
  18. <TABLE BORDER>
  19. <TR>
  20. <TH>Name</TH>
  21. <TH>Volume Name</TH>
  22. <TH>Volume Serial Number</TH>
  23. </TR>
  24. <%
  25. for each DiskInstance in Disks
  26. %>
  27. <TR>
  28. <TD><%=DiskInstance.Name%></TD>
  29. <TD><%=DiskInstance.VolumeName%></TD>
  30. <TD><%=DiskInstance.VolumeSerialNumber%></TD>
  31. </TR>
  32. <%
  33. Next
  34. %>
  35. <%
  36. Else
  37. %>
  38. <P>Error - <%=Err.description%>, <%=Err.number%>, <%=Err.Source%></P>
  39. <%
  40. end if
  41. %>
  42. </TABLE>
  43. </BODY>
  44. </HTML>