简体   繁体   中英

Replace or customize modal uninstallation windows in Inno Setup

Is it possible to replace next uninstalling modal windows with custom modal windows or pages in Inno Setup:

在此处输入图片说明

在此处输入图片说明

Both messages are shown always, except for silent (or very silent) uninstallations.

What you can do:

  • Change message texts:

     [Messages] ConfirmUninstall=Are you sure you want to completely remove %1 and all of its components? UninstalledAll=%1 was successfully removed from your computer. UninstalledMost=%1 uninstall complete.%n%nSome elements could not be removed. These can be removed manually. UninstalledAndNeedsRestart=To complete the uninstallation of %1, your computer must be restarted.%n%nWould you like to restart now?
  • Get rid of the messages by making the uninstaller run silently always by adding the /SILENT command-line switch to the UninstallString registry key. See also Can I disable uninstall confirmation message?

    Though this is bit of a hack, and you better do it only, if you have a good reason.

    And optionally implementing your custom messages/dialogs by implementing InitializeUninstall and CurUninstallStepChanged(usDone) , like:

     procedure CurUninstallStepChanged(CurUninstallStep: TUninstallStep); var DoneForm: TSetupForm; begin if CurUninstallStep = usDone then begin DoneForm := CreateCustomForm; { populate the form here... } DoneForm.ShowModal; end; end;
  • Another way to get rid of the message, when the uninstallation completes, is to handle usPostUninstall event and display your custom dialog box there. And forcefully abort the installer afterwards. But then the automatic restart of Windows, in case it's needed to complete the uninstallation, won't work.

  • You can also implement some DLL that watches for new message boxes and updates/submits them as they appear.

If you want to create custom pages in Uninstaller then No.

Uninstaller does NOT support creating custom pages.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM