Always the OCX, VB, Setup!
Solved
armiou
Posted messages
7
Status
Membre
-
armiou Posted messages 7 Status Membre -
armiou Posted messages 7 Status Membre -
Hello,
I created a setup for my program in VB, but when I install it on another machine, it shows the error: "Run time error '339' Component 'Rey_Xpbasics.ocx' or one of its dependencies not correctly registered: a file is missing or invalid"
You will tell me to install the ocx in c:\windows\system32, right?
But in my case, that doesn't solve the problem because my local disk is E, so the ocx is located in e:\windows\system32.
What should I do to make it find the ocx in c:\windows\system32 on another machine?
Thanks in advance
I created a setup for my program in VB, but when I install it on another machine, it shows the error: "Run time error '339' Component 'Rey_Xpbasics.ocx' or one of its dependencies not correctly registered: a file is missing or invalid"
You will tell me to install the ocx in c:\windows\system32, right?
But in my case, that doesn't solve the problem because my local disk is E, so the ocx is located in e:\windows\system32.
What should I do to make it find the ocx in c:\windows\system32 on another machine?
Thanks in advance
Configuration: Windows Vista Internet Explorer 7.0
8 réponses
Hello,
If you created your setup with the VB packaging, the error is not there, unless you changed the directories; you must leave the Windows and System32 directories as specified, the setup will place them in the right location.
According to the message sent back, your problem comes from the registration of the OCX in the registry. (under Vista)
To fix this, see this link
Follow the instructions, except for calling cmd, you need to open it as an admin,
>> Start >> Type CMD >> DO NOT HIT ENTER >> In the top of the menu right-click on the icon >> Open as Administrator and then follow the instructions from the link.
See you later
EDIT:
to make it automatic (I didn't know this) the code given by Jean-Yvon will probably also need to be activated as an administrator.
--
Experience teaches more surely than advice. (André Gide)
If you bump into a pot and it sounds hollow, it’s not necessarily the pot that’s empty. ;)-(Confucius)
If you created your setup with the VB packaging, the error is not there, unless you changed the directories; you must leave the Windows and System32 directories as specified, the setup will place them in the right location.
According to the message sent back, your problem comes from the registration of the OCX in the registry. (under Vista)
To fix this, see this link
Follow the instructions, except for calling cmd, you need to open it as an admin,
>> Start >> Type CMD >> DO NOT HIT ENTER >> In the top of the menu right-click on the icon >> Open as Administrator and then follow the instructions from the link.
See you later
EDIT:
to make it automatic (I didn't know this) the code given by Jean-Yvon will probably also need to be activated as an administrator.
--
Experience teaches more surely than advice. (André Gide)
If you bump into a pot and it sounds hollow, it’s not necessarily the pot that’s empty. ;)-(Confucius)
Hello,
You need to register the ocx or dll on the host system.
Attached is a small program
that allows you to do this
@+
You need to register the ocx or dll on the host system.
Attached is a small program
that allows you to do this
Private Declare Sub SetWindowPos Lib "User32" (ByVal hwnd As Long, ByVal hWndInsertAfter As Long, ByVal X As Long, ByVal Y As Long, ByVal cx As Long, ByVal cy As Long, ByVal wFlags As Long) Private Declare Function GetShortPathName Lib "kernel32" Alias "GetShortPathNameA" (ByVal lpszLongPath As String, ByVal lpszShortPath As String, ByVal cchBuffer As Long) As Long Private Sub Form_Load() SetWindowPos Me.hwnd, -1, (Screen.Width - Me.Width) / Screen.TwipsPerPixelX / 2, (Screen.Height - Me.Height) / Screen.TwipsPerPixelY / 2, Me.Width / Screen.TwipsPerPixelX, Me.Height / Screen.TwipsPerPixelY, 0 End Sub Private Sub Label2_OLEDragDrop(Data As DataObject, Effect As Long, Button As Integer, Shift As Integer, X As Single, Y As Single) Let’s go Data.Files(1), True End Sub Private Sub Label3_OLEDragDrop(Data As DataObject, Effect As Long, Button As Integer, Shift As Integer, X As Single, Y As Single) Let’s go Data.Files(1), False End Sub Private Sub picDesenr_OLEDragDrop(Data As DataObject, Effect As Long, Button As Integer, Shift As Integer, X As Single, Y As Single) Let’s go Data.Files(1), False End Sub Private Sub picEnr_OLEDragDrop(Data As DataObject, Effect As Long, Button As Integer, Shift As Integer, X As Single, Y As Single) Let’s go Data.Files(1), True End Sub Private Sub Let’s go(sFichier As String, bEnreg As Boolean) Dim sChemin As String Dim lRet As Long sChemin = String(256, 0) lRet = GetShortPathName(sFichier, sChemin, 255) sFichier = Left(sChemin, lRet) If bEnreg Then Shell "regsvr32 " & sFichier, vbNormalFocus Else Shell "regsvr32 /u " & sFichier, vbNormalFocus End If End Sub
@+
Thinking about it, I believe there is a way to fix it without any manipulation.
With a setup created on XP, the installation on Vista poses no problem, so I think that creating the setup while logged in as an admin should result in a valid setup.
For that, do not launch the wizard from the IDE but from the Start menu and open the wizard as an admin. (right-click)
See you!
--
Experience teaches more surely than advice. (André Gide)
If you bump into a pot and it sounds hollow, it’s not necessarily the pot that’s empty. ;)-(Confucius)
With a setup created on XP, the installation on Vista poses no problem, so I think that creating the setup while logged in as an admin should result in a valid setup.
For that, do not launch the wizard from the IDE but from the Start menu and open the wizard as an admin. (right-click)
See you!
--
Experience teaches more surely than advice. (André Gide)
If you bump into a pot and it sounds hollow, it’s not necessarily the pot that’s empty. ;)-(Confucius)
Thank you all for the responses!
I created the setup with Inno Setup
And I'm not installing it on Vista by the way, but on another XP PC.
I would like to add that I tried to run the compiled exe program on some of my friends' PCs, the error does not appear and the program works fine, but on others it doesn't work, so I don’t understand at all.
And where should this program, Jean-Yvon, be placed? Please?
I created the setup with Inno Setup
And I'm not installing it on Vista by the way, but on another XP PC.
I would like to add that I tried to run the compiled exe program on some of my friends' PCs, the error does not appear and the program works fine, but on others it doesn't work, so I don’t understand at all.
And where should this program, Jean-Yvon, be placed? Please?
Hello,
"And where should this jean-Yvon program be placed, please?"
It's a thing that runs by itself in drag'n drop. You drag the DLL to be registered into the "registration" box and the program takes care of everything! To uninstall, it's the same, just drag and drop and it's done!
See you later
JY
"And where should this jean-Yvon program be placed, please?"
It's a thing that runs by itself in drag'n drop. You drag the DLL to be registered into the "registration" box and the program takes care of everything! To uninstall, it's the same, just drag and drop and it's done!
See you later
JY
Jean Yvon, I don't understand!!
But I think I solved the problem, I included all the ocx used in innosetup and I chose to place them in the Windows system of the host machine. The error mentioned above no longer appears, but now the error 91 object variable or with block....is displayed.
But I think I solved the problem, I included all the ocx used in innosetup and I chose to place them in the Windows system of the host machine. The error mentioned above no longer appears, but now the error 91 object variable or with block....is displayed.
Hi,
I don't know Inno Setup. I do all my packaging with VB. I've never encountered any major problems! I can't answer your question!
See you later
JY
I don't know Inno Setup. I do all my packaging with VB. I've never encountered any major problems! I can't answer your question!
See you later
JY
Hello,
I don't know if the problem is still relevant, but the first error message you received (OCX registration issue) is likely due to the fact that you forgot to include the Rey_SubClasser.dll file in your installation. I also use the Rey_XPBasics OCX, and this OCX relies on Rey_SubClasser.dll, which is why you have that dependency error message when registering the OCX.
As for your second error message, you definitely have an object that is either not declared or poorly declared, but which one... It's up to you to figure out (be careful with the database name for databases. If it is incorrect, the record source won't pass, and you'll get that error message, for example).
Hoping this could help you or could be useful to others.
Fab.
I don't know if the problem is still relevant, but the first error message you received (OCX registration issue) is likely due to the fact that you forgot to include the Rey_SubClasser.dll file in your installation. I also use the Rey_XPBasics OCX, and this OCX relies on Rey_SubClasser.dll, which is why you have that dependency error message when registering the OCX.
As for your second error message, you definitely have an object that is either not declared or poorly declared, but which one... It's up to you to figure out (be careful with the database name for databases. If it is incorrect, the record source won't pass, and you'll get that error message, for example).
Hoping this could help you or could be useful to others.
Fab.