views:

426

answers:

4

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.

A: 

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.

Anthony D
A: 

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.

A: 

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.

GregUzelac
A: 

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

Peter Martin