Showing results for 
Show  only  | Search instead for 
Did you mean: 
Level 7

Method after OnMaintUIBefore but before OnUninstallingFile


I'm trying to figure out a way to capture the Mainteance mode after the OnMaintUIBefore() event but before the uninstallation gets to OnUninstallingFile().

Anyway I created a custom sdWelcomeMaint dialog that only has the Repair and Remove radio options (and some skinning). I personally do not want to have to call FeatureRemoveAll() because I'd rather have the system handle that and be able to exit early if certian conditions haven't been met. I'm at a loss because I cannot clearly find a way using the help nor the previous forum posts.

I'm hesitant to use OnUninstallingFile() with some hardcoded feature or file because if I need to I have to prevent uninstallation and I'd rather exit then have to hope abort() will put the possibly editted file back. Also if any features change or the actual order in which they are uninstall or installed changes or Features are uninstalled in any particular order. If I change something in the project I really won't remember to change the script after a few releases.

I need some event or way to access the Maintenance choice right after that dialog but before the actual unistallation happens? Or can I dynamically find the FIRST feature/file to use in OnUninstallingFile()?

Please, please help a fellow installer!

Note: OnMaintUIAfter() fires after the uninstallation or repair.
Labels (1)
0 Kudos
(1) Reply
Level 7

So I stumbled upon OnShowUI(). I feel like a god now.

Overriding OnShowUI() will give me full control over the installation. Now I do not have to rely on IS to throw these events in order to deal with them.

Now I only need to figure out how to determine if this execution is a first-time installation, Add/Remove call to repair or uninstallation or a cmdline Uninstallation...

This helps me suppress unwanted dialog and simulate a silent install/uninstall for when embedding this installer within another and still be able to pop-up error messages (as "/s" will suppress ALL dialogs even error messages).

I will update soon for prosperity...
0 Kudos