Ir para conteúdo
Fórum Script Brasil
  • 0

teste os componentes instalados


dark0

Pergunta

Verificar Quais componentes estão instalados no servidor!

Olá galera, beleza?

Bom.. eu achei esse script à um bom tempo atras. Não lembro de onde copiei, mas sempre me foi bastante útil!

Ele lista todos os componentes instalados no servidor! Componentes de E-mail, Upload, etc...

Para executar é simples: Copie o codigo, cole num editor, e salve com a extensão .asp!

componentes.asp

<% @ Language="VBScript" %>

<% Option Explicit %>

<%

Dim theComponent(11)

Dim theComponentName(11)

' componentes

theComponent(0) = "ADODB.Connection"

theComponent(1) = "SoftArtisans.FileUp"

theComponent(2) = "AspHTTP.Conn"

theComponent(3) = "AspImage.Image"

theComponent(4) = "LastMod.FileObj"

theComponent(5) = "Scripting.FileSystemObject"

theComponent(6) = "SMTPsvg.Mailer"

theComponent(7) = "CDONTS.NewMail"

theComponent(8) = "Jmail.smtpmail"

theComponent(9) = "SmtpMail.SmtpMail.1"

theComponent(10) = "Persits.Upload.1"

theComponent(11) = "UnitedBinary.AutoImageSize"

' apelido do componente!

theComponentName(0) = "ADODB"

theComponentName(1) = "SA-FileUp"

theComponentName(2) = "AspHTTP"

theComponentName(3) = "AspImage"

theComponentName(4) = "LastMod"

theComponentName(5) = "FileSystemObject"

theComponentName(6) = "ASPMail"

theComponentName(7) = "CDONTS"

theComponentName(8) = "JMail"

theComponentName(9) = "SMTP"

theComponentName(10) = "Persits Upload"

theComponentName(11) = "AutoImageSize"

Function IsObjInstalled(strClassString)

On Error Resume Next

  IsObjInstalled = False

  Err = 0

Dim xTestObj

Set xTestObj = Server.CreateObject(strClassString)

If 0 = Err Then IsObjInstalled = True

Set xTestObj = Nothing

  Err = 0

End Function

%>

<html>

<head>

<title>O q tem aqui?</title>

</head>

<body>

<table width="100%" border="1" cellspacing="0" cellpadding="0">

  <tr>

    <td align="center"><font face="Verdana, Arial, Helvetica, sans-serif" size="2" color="#000000"><b>Componentes

      instalados:</b></font></td>

  </tr>

  <tr>

    <td> <font face="Verdana, Arial, Helvetica, sans-serif" size="2">

      <table border="0" cellpadding="0" cellspacing="0" width="100%">

        <%

  Dim i

        For i=0 to UBound(theComponent)

      If Not IsObjInstalled(theComponent(i)) Then

     

  Else

            Response.Write "<tr>" & vbCrLf

          Response.Write "<td width=""100%"">" & vbCrLf

          Response.Write "<b>" & theComponentName(i) & "</b>" & vbCrLf

          Response.Write "</td>" & vbCrLf

          Response.Write "</tr>" & vbCrLf

      End If

    Next

    %>

  </table>

</font>

</td>

  </tr>

</table>

</body>

</html>

Até mais !!

Dark0

Link para o comentário
Compartilhar em outros sites

0 respostass a esta questão

Posts Recomendados

Até agora não há respostas para essa pergunta

Participe da discussão

Você pode postar agora e se registrar depois. Se você já tem uma conta, acesse agora para postar com sua conta.

Visitante
Responder esta pergunta...

×   Você colou conteúdo com formatação.   Remover formatação

  Apenas 75 emoticons são permitidos.

×   Seu link foi incorporado automaticamente.   Exibir como um link em vez disso

×   Seu conteúdo anterior foi restaurado.   Limpar Editor

×   Você não pode colar imagens diretamente. Carregar ou inserir imagens do URL.



  • Estatísticas dos Fóruns

    • Tópicos
      152,1k
    • Posts
      651,8k
×
×
  • Criar Novo...