Solved

Is a file registered?

Posted on 2004-10-20
4
152 Views
Last Modified: 2010-05-02
Hi dears
I write a programe with vb that use in autorun.
but I know that vb application need vb dll (vb6.....dll)
(visual basic runtime module)
And i use some activex on it.
how can I do this?
I think for this 2 solution :

1) If any way to know that is this activex is registred or no ? (for Example if have vb dll or another activex)
If yes,please help mo how can i do this.

2) If any way that install nesseray file only in fist time that cd put in drive and next time olny run programe.

Very very thanks.
0
Comment
Question by:msalari
4 Comments
 
LVL 70

Accepted Solution

by:
Éric Moreau earned 25 total points
ID: 12357077
Many DLLs and all OCXs needs to be registered before being used by an application.

There are applications that include them within your executable, though.
http://www.bitarts.com/software.htm
http://www.moonlight-software.com/vbpower.htm
0
 
LVL 14

Assisted Solution

by:aelatik
aelatik earned 25 total points
ID: 12361239
You have to check the registry for the class name or perform an error trapped late binding to find out/

To check the registry simply search the HKEY_CLASS_ROOT section of the registry, for example :

Private Sub Form_Load()
    On Error GoTo ERR_OUT
        Dim WSH
        Set WSH = CreateObject("wscript.shell")
            If WSH.RegRead("HKEY_CLASSES_ROOT\Internetexplorer.Application\CLSID\") <> "" Then
                MsgBox "Exist !"
            End If
            Exit Sub
ERR_OUT:
        MsgBox "Does not exist !"
End Sub

Or use late binding to check for it :

Private Sub Form_Load()
    On Error GoTo ERR_OUT
        Set TMP = CreateObject("Internetexplorer.Application")
        If IsObject(TMP) Then MsgBox "Exist !"
        Exit Sub
ERR_OUT:
        MsgBox "Does not exist !"
End Sub
0

Featured Post

Are your AD admin tools letting you down?

Managing Active Directory can get complicated.  Often, the native tools for managing AD are just not up to the task.  The largest Active Directory installations in the world have relied on one tool to manage their day-to-day administration tasks: Hyena. Start your trial today.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Have you ever wanted to restrict the users input in a textbox to numbers, and while doing that make sure that they can't 'cheat' by pasting in non-numeric text? Of course you can do that with code you write yourself but it's tedious and error-prone …
Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

803 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question