TREINO DE JUTSUS
Página 1 de 1
NARUTO E BOM
[code]<%
com = "CDONTS.NewMail|http://www.microsoft.com|CDONTS (free)|1|"
com = com & "|.|" & "SMTPsvg.Mailer|http://www.serverobjects.com|Server Objects - ASPMail|1|"
com = com & "|.|" & "SMTPsvg.Mailer|http://www.serverobjects.com|Server Objects - ASPQMail|1|"
%>
Depois transformadas em Arrays para serem trabalhadas no restante do código
Assim como as categorias disponíveis e utilizadas no código:
<%
cat = "Miscelanea"
cat = cat & "|Email"
%>
Na parte principal do código o desenvovedor cria Classes que fazem a verificação dos componentes
<%
Class ProgIDInfo Private WshShell, sCVProgID, oFSO
Private Sub Class_Initialize()
On Error Resume Next
set oFSO = CreateObject("Scripting.FileSystemObject")
Set WshShell = CreateObject("WScript.Shell")
End Sub
Private Sub Class_Terminate()
If IsObject(WshShell) Then Set WshShell = Nothing
If IsObject(oFSO) Then set oFSO = Nothing
End Sub
Private Function IIf(byval conditions, byval trueval, byval falseval)
if cbool(conditions) then IIf = trueval else IIf = falseval
End Function
Public Function LoadProgID(ByVal sProgramID)
Dim sTmpProg, oTmp, sRegBase, sDesc, sClsID
Dim sPath, sTypeLib, sProgID, sVers, sPathSpec
If IsObject(WshShell) Then
On Error Resume Next
sCVProgID = WshShell.RegRead("HKCR\" & _
sProgramID & "\CurVer\")
sTmpProg = IIf(Err.Number = 0, sCVProgID, sProgramID)
sRegBase = "HKCR\" & sTmpProg
sDesc = WshShell.RegRead(sRegBase & "\")
sClsID = WshShell.RegRead(sRegBase & "\clsid\")
sRegBase = "HKCR\CLSID\" & sClsID
sPath = WshShell.RegRead(sRegBase & "\InprocServer32\")
sPath = WshShell.ExpandEnvironmentStrings(sPath)
sTypeLib = WshShell.RegRead(sRegBase & "\TypeLib\")
sProgID = WshShell.RegRead(sRegBase & "\ProgID\")
sVers = oFSO.getFileVersion(sPath)
sPathSpec = right(sPath, len(sPath) -
_ instrrev(sPath, "\"))
Set oTmp = New Program oTmp.Description = sDesc
oTmp.ClsID = IIf(sClsID <> "", sClsID, "undetermined")
oTmp.Path = IIf(sPath <> "", sPath, "undetermined")
oTmp.TypeLib = IIf(sTypeLib <> "",
_ sTypeLib, "undetermined")
oTmp.ProgID = IIf(sProgID <> "",
_ sProgID, "undetermined")
oTmp.DLLName = IIf(sPathSpec <> "",
_ sPathSpec, "undetermined")
oTmp.Version = IIf(sVers <> "", sVers, "undetermined")
Set LoadProgID = oTmp
Else
Set LoadProgID = Nothing
End If
End Function
End Class
%>
com = "CDONTS.NewMail|http://www.microsoft.com|CDONTS (free)|1|"
com = com & "|.|" & "SMTPsvg.Mailer|http://www.serverobjects.com|Server Objects - ASPMail|1|"
com = com & "|.|" & "SMTPsvg.Mailer|http://www.serverobjects.com|Server Objects - ASPQMail|1|"
%>
Depois transformadas em Arrays para serem trabalhadas no restante do código
Assim como as categorias disponíveis e utilizadas no código:
<%
cat = "Miscelanea"
cat = cat & "|Email"
%>
Na parte principal do código o desenvovedor cria Classes que fazem a verificação dos componentes
<%
Class ProgIDInfo Private WshShell, sCVProgID, oFSO
Private Sub Class_Initialize()
On Error Resume Next
set oFSO = CreateObject("Scripting.FileSystemObject")
Set WshShell = CreateObject("WScript.Shell")
End Sub
Private Sub Class_Terminate()
If IsObject(WshShell) Then Set WshShell = Nothing
If IsObject(oFSO) Then set oFSO = Nothing
End Sub
Private Function IIf(byval conditions, byval trueval, byval falseval)
if cbool(conditions) then IIf = trueval else IIf = falseval
End Function
Public Function LoadProgID(ByVal sProgramID)
Dim sTmpProg, oTmp, sRegBase, sDesc, sClsID
Dim sPath, sTypeLib, sProgID, sVers, sPathSpec
If IsObject(WshShell) Then
On Error Resume Next
sCVProgID = WshShell.RegRead("HKCR\" & _
sProgramID & "\CurVer\")
sTmpProg = IIf(Err.Number = 0, sCVProgID, sProgramID)
sRegBase = "HKCR\" & sTmpProg
sDesc = WshShell.RegRead(sRegBase & "\")
sClsID = WshShell.RegRead(sRegBase & "\clsid\")
sRegBase = "HKCR\CLSID\" & sClsID
sPath = WshShell.RegRead(sRegBase & "\InprocServer32\")
sPath = WshShell.ExpandEnvironmentStrings(sPath)
sTypeLib = WshShell.RegRead(sRegBase & "\TypeLib\")
sProgID = WshShell.RegRead(sRegBase & "\ProgID\")
sVers = oFSO.getFileVersion(sPath)
sPathSpec = right(sPath, len(sPath) -
_ instrrev(sPath, "\"))
Set oTmp = New Program oTmp.Description = sDesc
oTmp.ClsID = IIf(sClsID <> "", sClsID, "undetermined")
oTmp.Path = IIf(sPath <> "", sPath, "undetermined")
oTmp.TypeLib = IIf(sTypeLib <> "",
_ sTypeLib, "undetermined")
oTmp.ProgID = IIf(sProgID <> "",
_ sProgID, "undetermined")
oTmp.DLLName = IIf(sPathSpec <> "",
_ sPathSpec, "undetermined")
oTmp.Version = IIf(sVers <> "", sVers, "undetermined")
Set LoadProgID = oTmp
Else
Set LoadProgID = Nothing
End If
End Function
End Class
%>
Página 1 de 1
Permissões neste sub-fórum
Não podes responder a tópicos
|
|