- Revenera Community
- :
- InstallShield
- :
- InstallShield Forum
- :
- How to run RegAsm /codebase with an InstallScript project?
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
I tried to post this question a few days ago, but when I went back to check on it, my post did not exist in the forum. So I'm trying it again.
My company has an InstallScript project (non-MSI), and we need to run RegAsm /codebase on one of our DLLs. I found some tutorials online for doing this, but they don't seem to apply to our project type. That is, the options I need simply do not exist in the UI. That includes both suggestions here (https://www.iwasdot.com/installshield-execute-a-batch-script/) as well as anything involving custom actions (as I interpret from the docs that custom actions do not apply to InstallScript projects). How can I accomplish this with InstallScript? I am using InstallShield 2013 and I know extremely little about it.
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
If it helps anyone in the future, this actually turned out to be really easy to accomplish. I went to the "Behavior and Logic" folder of the "Installation Designer" tab and selected "InstallScript". Then on the right-hand pane I selected the feature my DLL are associated with and then selected the "Installed" event handler. The following script registered my DLL for COM interop:
LaunchApplication("C:/Windows/Microsoft.NET/Framework/v4.0.30319/RegAsm.exe",
"../path/to/my.dll /codebase", "",
SW_HIDE, 0, LAAW_OPTION_NOWAIT);
And then I did something similar for the "Uninstalled" event handler:
LaunchApplication("C:/Windows/Microsoft.NET/Framework/v4.0.30319/RegAsm.exe",
"/unregister ../path/to/my.dll", "",
SW_HIDE, 0, LAAW_OPTION_NOWAIT);
- Mark as New
- Subscribe
- Mute
- Permalink
- Report Inappropriate Content
If it helps anyone in the future, this actually turned out to be really easy to accomplish. I went to the "Behavior and Logic" folder of the "Installation Designer" tab and selected "InstallScript". Then on the right-hand pane I selected the feature my DLL are associated with and then selected the "Installed" event handler. The following script registered my DLL for COM interop:
LaunchApplication("C:/Windows/Microsoft.NET/Framework/v4.0.30319/RegAsm.exe",
"../path/to/my.dll /codebase", "",
SW_HIDE, 0, LAAW_OPTION_NOWAIT);
And then I did something similar for the "Uninstalled" event handler:
LaunchApplication("C:/Windows/Microsoft.NET/Framework/v4.0.30319/RegAsm.exe",
"/unregister ../path/to/my.dll", "",
SW_HIDE, 0, LAAW_OPTION_NOWAIT);