Fai partire questo script e fammi sapere cosa ti restituisce:
codice:<% Dim comList(1) comList(0) = Array( "CDOSYS", "CDO.Message" ) comList(1) = Array( "CDONTS", "CDONTS.NewMail" ) Function IsAvailable( comIdentity ) On Error Resume Next IsAvailable = False Err = 0 Set xTestObj = Server.CreateObject( comIdentity ) If Err = 0 Then IsAvailable = True Set xTestObj = Nothing Err = 0 End Function Public Function CheckCOM() Avail = 0 strTxt = "<table cellpadding=3 cellspacing=3 border=0 align=center width=300>" & vbNewLine For Idx = LBound( comList ) To UBound( comList ) Provider = Idx strTxt = strTxt & vbTab & "<tr><td width=200><font class=norm>" & comList(Idx)(0) & "</font></td>" strTxt = strTxt & "<td align=right width=20><font class=norm>[</font></td>" If IsAvailable( comList(Idx)(1) ) Then strTxt = strTxt & "<td align=center><font face=tahoma size=2 color=blue>Available</font></td>" Avail = Avail + 1 Else strTxt = strTxt & "<td align=center><font class=norm>Unavailable</font></td>" End If strTxt = strTxt & "<td align=left width=20><font class=norm>]</font></td></tr>" & vbNewLine Next strTxt = strTxt & vbTab & "<tr><td colspan=4 height=30><font class=norm><font color=blue>" & Avail & "</font> of " strTxt = strTxt & UBound( comList ) + 1 & " supported components are available.</font></td></tr>" & vbNewLine CheckCOM = strTxt & "</table>" & vbNewLine End Function Response.Write( CheckCOM() ) %>

Rispondi quotando