home *** CD-ROM | disk | FTP | other *** search
/ io Programmo 27 / IOPROG_27.ISO / SOFT / ADSDK.ZIP / Samples / ASP / First / enum.asp < prev   
Encoding:
Text File  |  1999-03-11  |  1021 b   |  35 lines

  1. <html>
  2.  
  3. <head>
  4. <meta name="GENERATOR" content="Microsoft FrontPage 3.0">
  5. <title>Enumerating a Computer Object using ADSI and ASP</title>
  6. </head>
  7. <%
  8.   compName = Request.Form("computer")
  9.   usrName = Request.Form("userName")
  10.   password = Request.Form("password")
  11.  
  12.   adsPath = "WinNT://" & compName & ",computer"
  13.   Set dso = GetObject("WinNT:")
  14.   Set comp = dso.OpenDSObject(adsPath, userName, password, 1)
  15.  
  16. %>
  17.  
  18. <body>
  19.  
  20. <p><small><font face="Verdana"><strong><font color="#0080C0">Computer Name</font></strong>:
  21. <%Response.Write comp.Name%></font></small></p>
  22.  
  23. <p><font face="Verdana"><small>Contains the following objects:</small></font></p>
  24.  
  25. <table border="1" width="100%" cellspacing="0" cellpadding="0">
  26. <%for each obj in comp %>
  27.   <tr>
  28.     <td width="35%"><small><font face="Verdana"> <%Response.Write obj.Name%></font></small></td>
  29.     <td width="65%"><small><font face="Verdana"> <%Response.Write obj.Class%></font></small></td>
  30.   </tr>
  31. <% next %>
  32. </table>
  33. </body>
  34. </html>
  35.