0

I'm trying to add a custom action to the end of my installer but it requires elevation.

I am using Installshield Limited Edition and my custom action is written in C#.

The custom action executes when there is no elevation but as soon as I add elevation to the manifest, I get an error and the msi rolls back.

I had hoped that the exe would inherit the elevation from the installer but this isn't the case. I can't use a dll for the custom action in this version of Installshield.

Any ideas?

Thanks, Alan

Alan Spark
  • 8,152
  • 8
  • 56
  • 91

1 Answers1

2

Actually there are ways of using a DLL CA in InstallShield LE. Check out my "Augmenting InstallShield" blog articles such as:

Augmenting InstallShield using Windows Installer XML - Certificates

The concept is you use Windows Installer XML (WiX) Deployment Tools Foundation (DTF) to author a C# managed custom action. (See more here: Deployment Tools Foundation (DTF) Managed Custom Actions ) You then author a merge module to encapsulate this custom action and it's sequencing information. Then finally you consume this merge module in InstallShield.

Christopher Painter
  • 54,556
  • 6
  • 63
  • 100
  • Thanks for your answer, it is really useful to know about this way of combining InstallShield and WiX. I've tried it out and it looked promising but unfortunately the elevation wasn't transferred to my custom action and I faced the same problem. I think I need to go back to the drawing board. – Alan Spark Jun 25 '13 at 19:33
  • 1
    If you schedule the custom action in the installation execute sequence between InstallInitialize and InstallFinalize as deferred with the no impersonate option (system context) it will be elevated. See: http://www.installsite.org/pages/en/isnews/200108/ for more information. – Christopher Painter Jun 25 '13 at 20:21
  • This will do the job. Thanks a lot for your help. – Alan Spark Jun 26 '13 at 18:48