Question

How do you add a DLL to the GAC from an InstallScript Project in InstallShield? I tried added [GLOBALASSEMBLYCACHE] as a destination to the component, with no luck. It tells me that is not valid data for the destination.

Was it helpful?

Solution

An install script only project has no way of putting a file in the GAC. You need an install script MSI project. I ended up creating a separate windows installer and using LauchAppAndWait from install shield to run it. Pretty much a hack because I didn't want to switch to an MSI project.

OTHER TIPS

Rather than create an InstallScript MSI project, you could create a merge module that installs the desired components to the GAC. Then include the MSM in your InstallScript cab installation. That way you avoid the annoyance of LaunchAppAndWait.

Gacutil can do it but Gacutil isn't redistributable. It's possible to write your own code to call the fusion API and then call it from installscript but truthfully MSI is way easier.

IS scripts can access Win32 and other DLL entry pts so you wont require a dedicated MSI installer.

We have a Setup that needs to change file access permissions early in the install process. We added a utility to our support files & billboards section, and those end up in Setup's Temp folder. Then we use LaunchAppAndWait, etc.

Another option may be to modify your .net assembly to auto-GAC itself when it is registered. That easier if using System.Configuration.Install & friends.

gacutil can do it, just put it in the supportdir (temp dir) and use it from there. then wipe out the temp dir after.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top