Does Inno Setup verysilent uninstallation option remove shared files?

Viewed 78

The /VERYSILENT option offered by Inno Setup is very helpful when deploying applications to a whole organization using a centralized software, but there are some perks which are not entirely clear to me.

In particular, how does it behave when removing dlls/com controls (during an uninstallation) which need to be unregistered and are marked as sharedobject? Without the /VERYSILENT switch, a popup is shown, to allow the user to select whether those objects should be removed or not.

Is the default option ("Yes", meaning "remove the object") used?

1 Answers

Yes, the sharedfile files are removed in silent and very silent uninstallations:

2021-01-04 11:42:56.253 Log opened. (Time zone: UTC+01:00)
2021-01-04 11:42:56.253 Setup version: Inno Setup version 6.1.2
...
2021-01-04 11:42:56.253 Uninstall command line: /SECONDPHASE="C:\Program Files (x86)\My Program\unins000.exe" /FIRSTPHASEWND=$530FFA /INITPROCWND=$461118 /log="B:\sharedo\uninstall.log" /verysilent
...
2021-01-04 11:42:56.284 Starting the uninstallation process.
2021-01-04 11:42:56.285 Decrementing shared count (32-bit): C:\Program Files (x86)\My Program\MyDll.dll
2021-01-04 11:42:56.285 Shared count reached zero.
2021-01-04 11:42:56.416 Deleting file: C:\Program Files (x86)\My Program\MyDll.dll
2021-01-04 11:42:56.416 Deleting directory: C:\Program Files (x86)\My Program
2021-01-04 11:42:56.955 Deleting directory: C:\Program Files (x86)\My Program
2021-01-04 11:42:56.986 Uninstallation process succeeded.
2021-01-04 11:42:56.986 Removed all? Yes
2021-01-04 11:42:56.986 Need to restart Windows? No
2021-01-04 11:42:56.988 Log closed.


Check also the TExtUninstallLog.ShouldRemoveSharedFile function in Inno Setup source code.

Related