John
Posts: 5
Joined: Mon Aug 15, 2011 12:21 pm

file dependencies - install order

Hi,

I have an installer that includes an OCX that is dependant on MFC dll's.
I have included the dll's in the installer, the problem is that when the installer tries to register the OCX it fails because the MFC dll's are not found.
Is there a way to ensure that the dll's are copied first so that the OCX can be registered?

Thanks - John.
Bogdan
Posts: 2791
Joined: Tue Jul 07, 2009 7:34 am
Contact: Website

Re: file dependencies - install order

Hi John,
the problem is that when the installer tries to register the OCX it fails because the MFC dll's are not found.
Can you please open your file explorer when the error appears on the screen and browse for the files while the error is on the screen, without
closing the installer.
Is there a way to ensure that the dll's are copied first so that the OCX can be registered?
The order in which the files are installed is given by their sequence number from File table. You can use Orca.exe to open your MSI
package, go to File table and check their sequence. For testing you can even modify it, to see if changing the order fixes your problem.

Regards,
Bogdan
Bogdan Mitrache - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
John
Posts: 5
Joined: Mon Aug 15, 2011 12:21 pm

Re: file dependencies - install order

Thanks Bogdan!!

I used Orca and sure enough I found that the OCX was the first file in the sequence.
I have changed the sequence and will test later this week when I have a clean machine to test on.

Thanks again.
John
Posts: 5
Joined: Mon Aug 15, 2011 12:21 pm

Re: file dependencies - install order

Hi Bogdan,

I ran the installer on my own PC(not a clean machine) and it failed saying that one of the dll's could not be found in disk1.cab.
The dll that it cant find changes if i change the file sequence in Orca. It always fails to find one of them.

Any ideas?

Thanks - John.
Bogdan
Posts: 2791
Joined: Tue Jul 07, 2009 7:34 am
Contact: Website

Re: file dependencies - install order

This error, saying that it cannot find the .cab file, it usually appears when there are duplicate sequence numbers used for the files.
Can you please make sure that the numbers you have added/edited don't have duplicates in the table?

Regards,
Bogdan
Bogdan Mitrache - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
John
Posts: 5
Joined: Mon Aug 15, 2011 12:21 pm

Re: file dependencies - install order

Hi Bogdan,

Thank you for helping with this!
I have 8 files in the installer and sequence numbers 1 to 8 with no duplicates.

Best regards - John
Bogdan
Posts: 2791
Joined: Tue Jul 07, 2009 7:34 am
Contact: Website

Re: file dependencies - install order

Hi John,

Have you managed to test the package on a clean machine? Did it made any difference?

Also, to make sure the registration fails due to the installation order of the files, can you first copy all the dependencies manually to the install location
and create a simple test MSI that installs and register only your OCX. If indeed the problem is related to the MFC files then the test package should work.

Regards,
Bogdan
Bogdan Mitrache - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube
John
Posts: 5
Joined: Mon Aug 15, 2011 12:21 pm

Re: file dependencies - install order

Hi Bogdan,

I followed your advice and found that the OCX is failing to register for some reason, I need to work out.

Thanks again.
Bogdan
Posts: 2791
Joined: Tue Jul 07, 2009 7:34 am
Contact: Website

Re: file dependencies - install order

Hi John,

Does the registration of the OCX file works when performed from the command prompt? If so you can try the following workaround explained by my colleague.

Regards,
Bogdan
Bogdan Mitrache - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”