Video Screencast Help
Search Video Help Close Back
to help
Not able to make it to Vision this year? Get a sampling in the Best of Vision on Demand group.

DLL with Interoperability

Updated: 21 May 2010 | 4 comments
Alfredo Hidalgo's picture
0 0 Votes
Login to vote
This issue has been solved. See solution.

Hi, I have a DLL with Interoperability and I need to add it to my installation. The problem, that DLL isn't possible register like a common DLL, normally I use a REGASM.EXE file to register in my machine.

How can I automatize this process in my installation?....

Discussion Filed Under:

Comments

Bill MacEachern's picture
03
Mar
2009
0 Votes 0
Login to vote

Install the DLL and then use a custom action to run regasm on it.

Alfredo Hidalgo's picture
03
Mar
2009
0 Votes 0
Login to vote

Sorry, I'm not so good in that thing. Could you explain me in what part do that, and how?....

Bill MacEachern's picture
03
Mar
2009
0 Votes 0
Login to vote

Go to MSI Script. Select the Execute Deferred tab. Scroll down to the bottom. Drag & drop an Execute Program from Destination action and place it just before InstallFinalize. The tricky part is what to plug into the dialog to make it work, and this is because of the various locations of regasm.exe based on the versions of .NET installed and what your app requires. Finally, wrap the action in an If NOT Installed condition so it doesn't run during a modify or uninstall operation.



Edit: This is but one of many ways to do this. If you are a developer, you could write some vbscript to run regasm and then use a Call VBScript custom action, or a DLL to do it or even WiseScript. There are several choices for you.

Alfredo Hidalgo's picture
04
Mar
2009
0 Votes 0
Login to vote

Bill, thanks for your help. It worked very well.