Solved

Is a file registered?

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

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

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
Deploying a Microsoft Access application in a Citrix environment is not difficult but takes a few steps. However, Citrix system people are often of little help, as they typically know next to nothing about Access. The script provided here will take …
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
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…

705 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

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now