Solved

Is a file registered?

Posted on 2004-10-20
4
153 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

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

820 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