1
votes

I'm using InstallShield 2012 Spring Express. I finally figured out that, during the installation for my app, I could run a custom action with an elevated process EXE (application manifest set to "requireAdministrator") if I set its "In-Script Execution" property to "Deferred Execution In System Context."

That's nice.

But now I must be able to do exactly the same thing during the uninstall. So far, even on the paid version of InstallShield 2012 Spring Express, I can't get it to work.

First of all, for the "Custom Actions During Uninstallation" section, there are only two entries, "Before System Changes" and "After System Changes."

I didn't try adding my custom action to "After System Changes," because the EXE that I need to run is part of my package (and thus would have been removed by then.) And so I added it to "Before System Changes." Now for some reason, when I add it to "Before System Changes," there is no "In-Script Execution" option. And because I don't have this option, when my uninstall attempts to run the elevated process EXE, it fails with an error 1721...which is exactly the same error I used to get during the installation, until I changed the "In-Script Execution" option to "Deferred Execution In System Context."

So, how can I get my elevated process EXE to run correctly during the uninstall? Is InstallShield incapable of properly handling this?

Thanks, JP

1

1 Answers

0
votes

You can author a merge module using Windows Installer XML to correctly schedule and sequence your custom action. InstallShield express can then consume that module. See:

Augmenting InstallShield using Windows Installer XML - Certificates

If you aren't comfortable mixing tools ( this is just like writing a DLL in VB.NET and referencing it in an EXE written in C#) then you'd have to upgrade to InstallShield Professional.