Results 1 to 5 of 5

Thread: knock knock. is dll there?

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Mar 2000
    Location
    Pittsburgh, PA
    Posts
    329
    i need vb to tell me if the user a has a certain dll ison their computer and properly registered. how do i do this?
    ______________

  2. #2
    Guest
    I don't think there is a way to check if it has been registered already. But registering it again won't hurt it.

    Code:
    Shell "regsvr32 C:\Windows\System\MyControl.ocx" 'or .dll

  3. #3

    Thread Starter
    Hyperactive Member
    Join Date
    Mar 2000
    Location
    Pittsburgh, PA
    Posts
    329
    the reason i need to do this is b/c my program will proform
    an operation with a certain dll if the dll is installed.

    otherwise the program goes through a process that only works 50% of the time error free.

    i'm trying to use the dll anytime i can but i dont want to ship it with my program.

    so if anyone knows how to check for the dll (if it is possible) please tell me. thanks.
    ______________

  4. #4
    Guest
    To see if the dll exists on the users computer?

    Use the Dir function.

    Code:
    If Dir("C:\Windows\System\MyControl.dll") = "" Then
    Msgbox "Dll file doesn't exist!  Please email me for it!", vbCritical
    End If

  5. #5
    old fart Frans C's Avatar
    Join Date
    Oct 1999
    Location
    the Netherlands
    Posts
    2,926
    You could use late binding, and trap the error if it isn't properly registered. The disadvantage of late binding is a slight loss of performance.
    eg

    Private MySub()
    Dim MyObj as Object
    On Error Goto HandleIt
    Set MyObj = CreateObject("Word.Application")
    ' do some stuff

    Exit Sub
    HandleIt:
    MsgBox "Word is not installed"
    End Sub

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width