|
-
Oct 21st, 2000, 06:01 PM
#1
Thread Starter
Hyperactive Member
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?
-
Oct 21st, 2000, 06:23 PM
#2
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
-
Oct 21st, 2000, 06:50 PM
#3
Thread Starter
Hyperactive Member
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.
-
Oct 21st, 2000, 07:08 PM
#4
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
-
Oct 22nd, 2000, 06:01 AM
#5
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|