Inno setup executes [UninstallRun] during installation followup

Toby

This question:

Inno setup executes [UninstallRun] during installation

E.g. Code:

[UninstallRun]
Filename: "{sys}\OfflineSvc.exe"; Parameters: "-uninstall"; WorkingDir: "{sys}"; Flags: skipifdoesntexist 32bit; StatusMsg: "Offline Processing service is being uninstalled. Please wait..."; BeforeInstall: SimpleStopService('Offline_Service', True, False); Flags: waituntilterminated

doesn't have a clear solution. It SEEMS to indicate the cause but provides no obvious solution (maybe I'm just dense).

Why does an UNINSTALLRUN item run during INSTALLATION?

If that is normal - how can you prevent it?

The INNO help says:

The [UninstallRun] section is optional as well, and specifies any number of programs to execute as the first step of uninstallation.

So one would expect that the UNINSTALLRUN section would only be executed when UnInstalling.

Sorry - I am new to posting on SO and it won't let me comment on the above question so I don't see any alternative to get more info except for posting a new question. If there is a better way for newbies please let me know how I SHOULD have done it.

Robert Wigley

The [UninstallRun] section does not actually run during the installation, but writes into the uninstaller log that is created during installation. You simply specify the [UninstallRun] section in the Setup script so that you can tell the uninstaller what to do in addition to removing whatever was installed e.g. you could use it to stop and remove a Service that you installed using sc.exe in the [Run] section during the installation.

In the referenced example, it is evaluating the {code} function to determine the hardcoded filename to add to the uninstaller log, as I believe the uninstaller cannot have a code query in to be evaluated at uninstall, only a hardcoded filename and path which is stored in the uninstall log.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Java

Inno Setup: Load file edited during installation for wpInfoAfter

From Dev

Force Inno Setup to show UAC prompt during installation

From Dev

Show text during installation process with inno-setup

From Dev

Inno Setup Executing a large sql script file during installation

From Dev

Canceling an installation in Inno Setup

From Dev

Inno Setup Postpone locked file replacing to the next restart during silent installation

From Dev

Installer created via Inno Setup, can't close applications during installation on Windows 10

From Dev

Inno setup: change AppVerName value during install

From Dev

Inno setup: change AppVerName value during install

From Dev

Setup Debian mirrors DURING installation

From Dev

Inno setup: detect installation based on product code

From Dev

Sign all exe files on Inno Setup Installation

From Dev

Stop InstallShield installation when Inno Setup is detected

From Dev

Inno Setup - How to set permissions of installation folder

From Dev

Inno setup: detect installation based on product code

From Dev

Errors during angularfire2 installation and setup

From Dev

Inno Setup: Reading a file from installer during uninstallation

From Dev

Inno setup compiler How to set launching image during app loading

From Java

Check installation path for spaces and special symbol in Inno Setup

From Dev

Inno Setup custom dialog with per user or per machine installation

From Dev

Inno Setup 32bit and 64bit dll installation

From Dev

Inno setup subfolders with additional installation in "All Programs" list?

From Dev

Inno Setup: restart during setup process won't start after reboot

From Dev

Inno Setup - How to edit a specific line from a text file during setup?

From Dev

Inno setup hide installation items when switching from one installation to ther other

From Dev

Inno Setup Load defaults for custom installation settings from a file (.inf) for silent installation

From Dev

Inno setup hide installation items when switching from one installation to ther other

From Dev

Duplicate entry in installed program when Inno Setup installation is upgraded with MSI/WiX installation

From Dev

How to unpin icons of 2 programs(diff versions) of the same name during uninstall using Inno Setup?

Related Related

  1. 1

    Inno Setup: Load file edited during installation for wpInfoAfter

  2. 2

    Force Inno Setup to show UAC prompt during installation

  3. 3

    Show text during installation process with inno-setup

  4. 4

    Inno Setup Executing a large sql script file during installation

  5. 5

    Canceling an installation in Inno Setup

  6. 6

    Inno Setup Postpone locked file replacing to the next restart during silent installation

  7. 7

    Installer created via Inno Setup, can't close applications during installation on Windows 10

  8. 8

    Inno setup: change AppVerName value during install

  9. 9

    Inno setup: change AppVerName value during install

  10. 10

    Setup Debian mirrors DURING installation

  11. 11

    Inno setup: detect installation based on product code

  12. 12

    Sign all exe files on Inno Setup Installation

  13. 13

    Stop InstallShield installation when Inno Setup is detected

  14. 14

    Inno Setup - How to set permissions of installation folder

  15. 15

    Inno setup: detect installation based on product code

  16. 16

    Errors during angularfire2 installation and setup

  17. 17

    Inno Setup: Reading a file from installer during uninstallation

  18. 18

    Inno setup compiler How to set launching image during app loading

  19. 19

    Check installation path for spaces and special symbol in Inno Setup

  20. 20

    Inno Setup custom dialog with per user or per machine installation

  21. 21

    Inno Setup 32bit and 64bit dll installation

  22. 22

    Inno setup subfolders with additional installation in "All Programs" list?

  23. 23

    Inno Setup: restart during setup process won't start after reboot

  24. 24

    Inno Setup - How to edit a specific line from a text file during setup?

  25. 25

    Inno setup hide installation items when switching from one installation to ther other

  26. 26

    Inno Setup Load defaults for custom installation settings from a file (.inf) for silent installation

  27. 27

    Inno setup hide installation items when switching from one installation to ther other

  28. 28

    Duplicate entry in installed program when Inno Setup installation is upgraded with MSI/WiX installation

  29. 29

    How to unpin icons of 2 programs(diff versions) of the same name during uninstall using Inno Setup?

HotTag

Archive