|
-
Sep 28th, 2000, 08:21 AM
#1
Thread Starter
Frenzied Member
How do i use Regsvr32.exe at run time???
-
Sep 28th, 2000, 08:31 AM
#2
Fanatic Member
Shell "Regsrv32.exe /r blah.dll", vbNormalFocus
r0ach™
Don't forget to rate the post
-
Sep 28th, 2000, 08:43 AM
#3
Fanatic Member
How about this...
New Project:
Form
Name = frmMain
Caption = "r0ach"
CheckBox
Name = chkReg
Value = vbChecked
Caption = "Register"
Code:
Private Sub Form_Load()
Me.OleDropMode = 1
End Sub
Private Sub Form_OLEDragDrop(Data As DataObject, _
Effect As Long, _
Button As Integer, _
Shift As Integer, _
X As Single, _
Y As Single)
If chkReg.Value = vbChecked Then
If Shell("Regsvr32.exe " & Data.Files(1), vbHide) then
MsgBox Data.Files(1) & " was registered successfully"
Else
MsgBox Data.Files(1) & " was not registered"
End If
Else
If Shell("Regsvr32.exe /u " & Data.Files(1), vbHide) then
MsgBox Data.Files(1) & " was unregistered successfully"
Else
MsgBox Data.Files(1) & " was not unregistered"
End If
End If
End Sub
r0ach™
Don't forget to rate the post
-
Sep 28th, 2000, 09:08 AM
#4
Thread Starter
Frenzied Member
cool
but what is DataObject, is it a type
data.files(1)->????????????
-
Sep 28th, 2000, 09:12 AM
#5
Thread Starter
Frenzied Member
ok
it ok i figure it out
Thank a lot for the code
Can i register .ocx(active x) with it to??
-
Sep 28th, 2000, 09:21 AM
#6
Thread Starter
Frenzied Member
hummmmm!
Ok i did a test to unregister and then register it back and it gave that error both time:.........dll was loaded, but then DllRegisterServer entry point was not found.
DllRegisterServer may not be exported or a corrup version of ........dll may be in memory.
What the problem!
-
Sep 28th, 2000, 09:21 AM
#7
Fanatic Member
I believe so. I'm not sure though.
r0ach™
Don't forget to rate the post
-
Sep 28th, 2000, 09:41 AM
#8
Fanatic Member
I tested it, and got the same error. But according to the msgboxes, it registered and unregistered.
lemme check something...
OK. Try this:
Code:
Private Sub Form_Load()
Me.OleDropMode = 1
End Sub
Private Sub Form_OLEDragDrop(Data As DataObject, _
Effect As Long, _
Button As Integer, _
Shift As Integer, _
X As Single, _
Y As Single)
If chkReg.Value = vbChecked Then
On Error Resume Next
Shell "Regsvr32.exe /s " & Data.Files(1), vbNormal
If Err = 0 Then
MsgBox Data.Files(1) & " was registered successfully"
Else
MsgBox Data.Files(1) & " was not registered"
End If
On Error GoTo 0
Else
On Error Resume Next
Shell "Regsvr32.exe /u /s " & Data.Files(1), vbNormal
If Err = 0 Then
MsgBox Data.Files(1) & " was unregistered successfully"
Else
MsgBox Data.Files(1) & " was not unregistered"
End If
On Error GoTo 0
End If
End Sub
r0ach™
Don't forget to rate the post
-
Sep 28th, 2000, 09:53 AM
#9
Thread Starter
Frenzied Member
You got it
Now it work, what was wrong, is it the parameters that you (/u, /s).So i put all my dll on the other computer and then i make a loop to register all the dll that i've copied.
??
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
|