Add to Favorites    Make Home Page 5331 Online  
 Language Categories  
 Our Services  

Home » ASP Home » ADO Home » ProgIDInfo Object

A D V E R T I S E M E N T

Search Projects & Source Codes:

Title ProgIDInfo Object
Description ProgIDInfo returns information about COM objects installed on the server. ProgIDInfo is useful for determining the CLSID, typeLib, current version, dll name, path to dll, library description, etc... for one or more entered class strings. ProgIDInfo is an extremely helpful tool for administrators anxious to learn about the limits of their environment by probing the Windows registry for information about available com objects. Properties ================ No Exposed Properties Methods ================ LoadProgID(sProgramID) Set object = obj.LoadProgID(sProgramID) Retrieves information about the class string entered in the sProgramID argument. Returns a Program object. The Program object returns seven read only properties. Each property contains information about the entered class string: Program Object properties: ========================== All program object properties return "undetermined" if the information cannot be found in the registry for that specified com object. Description returns the readable description for the entered com object. example: for Scripting.FileSystemObject, Description property returns: "Scripting Runtime Library" ClsID returns the class id for the entered com object as string. ProgID returns the current version specific program id for the entered com object as string. For example, if you enter "Excel.Application" and you have Excel 2000 on the server, the ProgID property of the program object will return "Excel.Application.9" which is Excel 2000's class string. Path returns the absolute path to the COM object being called on the server as string. Useful for fixing permissions on COM objects since you'll need to know where the dll is to set it's permissions. TypeLib returns a GUID as string representing the object's type library. Useful with the metadata tag. Version returns version information as string for the specified com object only if the Path property returns a valid path. DLLName returns the name of the dll or executable being called with that class string as a string. Includes the extension. You can call the LoadProgID method repeatedly without having to create a new instance of the class. A new Program object will be automatically created for each instance.
Category ASP » ADO
Hits 4909
Code Select and Copy the Code
<% Class Program Public Description, ClsID, ProgID, Path, TypeLib, Version, DLLName End Class 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 = "HKCRCLSID" & 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 %>

Related Source Codes

Script Name Author
ııııııııııııııııııııı VyomWorld
Resistor color code reader A.Chermarajan.
Telephone Directory dhivya
card swapping game (Mini Project) nityanand
simple hangman-pascalsource Seabert
college dirtectory (Mini Project) msridhar
Poll Application John van Meter
ASP Daily Hit Counter. Tejaskumar Gandhi
To avoid null in asp environment using sql Sami
Maklumbalas webmaster
poll John van Meter
EasyASP Template Engine. TjoekBezoer
Basic Calculator using HTML & Javascript. Patrick M. D Souza
What servers support ASP ? VyomWorld
What is ASP? VyomWorld

A D V E R T I S E M E N T




Google Groups Subscribe to SourceCodesWorld - Techies Talk
Email:

Free eBook - Interview Questions: Get over 1,000 Interview Questions in an eBook for free when you join JobsAssist. Just click on the button below to join JobsAssist and you will immediately receive the Free eBook with thousands of Interview Questions in an ebook when you join.

New! Click here to Add your Code!


ASP Home | C Home | C++ Home | COBOL Home | Java Home | Pascal Home
Source Codes Home Page

 Advertisements  

Google Search

Google

Source Codes World.com is a part of Vyom Network.

Vyom Network : Web Hosting | Dedicated Server | Free SMS, GRE, GMAT, MBA | Online Exams | Freshers Jobs | Software Downloads | Interview Questions | Jobs, Discussions | Placement Papers | Free eBooks | Free eBooks | Free Business Info | Interview Questions | Free Tutorials | Arabic, French, German | IAS Preparation | Jokes, Songs, Fun | Free Classifieds | Free Recipes | Free Downloads | Bangalore Info | Tech Solutions | Project Outsourcing, Web Hosting | GATE Preparation | MBA Preparation | SAP Info | Software Testing | Google Logo Maker | Freshers Jobs

Sitemap | Privacy Policy | Terms and Conditions
Copyright ©2003-2017 SourceCodesWorld.com, All Rights Reserved.
Page URL: http://www.sourcecodesworld.com/source/show.asp?ScriptID=20


Download Yahoo Messenger | Placement Papers | Free SMS | C Interview Questions | C++ Interview Questions | Quick2Host Review