Load DLL from File table
I want to write a Custom action DLL that exports couple of functions. Now the real problem is, one of the exported functions loads another library which is present in a File table. I can keep this DLL in a Binary table as well and use it but why to do it if it is already a part of your package. Any way out for this????
0 Comments
[ + ] Show comments
Answers (7)
Please log in to answer
Posted by:
spartacus
14 years ago
Given that your custom action DLL is performing preinstallation checks at a time when the other dependent DLL's have not yet been installed, I can't see any other way (apart from Ian's suggestion of a separate package) than having the DLL(s) in the binary table as well as in the main filestore.
Many vendors provide MSI packages with Custom Action DLL's which perform prerequisite checks and by far the most common method they employ is to use the binary table. If you wish the DLL(s) to also be permanently installed, then they will need to be present in both the binary and file tables, IMHO.
Is it such a large overhead for your package to have the files in the CAB and binary table, I can't imagine DLL's would be particularly large in size .... or are they ?
Regards
Spartacus
Many vendors provide MSI packages with Custom Action DLL's which perform prerequisite checks and by far the most common method they employ is to use the binary table. If you wish the DLL(s) to also be permanently installed, then they will need to be present in both the binary and file tables, IMHO.
Is it such a large overhead for your package to have the files in the CAB and binary table, I can't imagine DLL's would be particularly large in size .... or are they ?
Regards
Spartacus
Posted by:
captain_planet
14 years ago
I'm not sure what you're trying to do, and if it's really necessary, but you could try running your CA just before the InstallFinalize action as deferred (I guess it depends on what you're doing). That way the dll will have been installed on to the workstation, and registered, ready for you to call it from your own CA.
Posted by:
milindsm
14 years ago
ok... Here is the scenario...
1. I have a DLL SomeDLL.dll that contains exported functions for a custom action.
2. Methods from this DLL use some other DLLs as well to perform some pre-install checks.
3. These other DLLs are part of installation as well (i.e. they have entry in File, Component etc. tables)
4. Since the CA methods require these DLLs, either they have to be already installed (not possible as CA is doing some pre-install checks) or these DLLs should be added in a Binary table that can be extracted at some temporary location for use (But this will unnecessarily have 2 copies of these file - 1 in Binary, 2 in File(indirectly in a CAB))
How to achieve this...!!!
1. I have a DLL SomeDLL.dll that contains exported functions for a custom action.
2. Methods from this DLL use some other DLLs as well to perform some pre-install checks.
3. These other DLLs are part of installation as well (i.e. they have entry in File, Component etc. tables)
4. Since the CA methods require these DLLs, either they have to be already installed (not possible as CA is doing some pre-install checks) or these DLLs should be added in a Binary table that can be extracted at some temporary location for use (But this will unnecessarily have 2 copies of these file - 1 in Binary, 2 in File(indirectly in a CAB))
How to achieve this...!!!
Posted by:
anonymous_9363
14 years ago
There is some VBScript here on AD which shows you how to extract a file from the Binary table. It's pretty straightforward.
Even more straightforward would be to do what one of the installer providers (InstallShield) does: provide the various DLLs as a separate package and have the dependent package check for its installation. You then provide instructions that Someother.Package must be installed first.
Even more straightforward would be to do what one of the installer providers (InstallShield) does: provide the various DLLs as a separate package and have the dependent package check for its installation. You then provide instructions that Someother.Package must be installed first.
Posted by:
milindsm
14 years ago
Posted by:
milindsm
14 years ago
Rating comments in this legacy AppDeploy message board thread won't reorder them,
so that the conversation will remain readable.
so that the conversation will remain readable.