I have a common application -like a media player- for each different retail product that is installed in the same folder i.e.
C:\program files\myapp
and the different content -like movies- are all installed in the same folder
C:\program files\myapp\movies
For each separate installation (separate retail product), I just create a shortcut to open the application with the specific content like mediaplayer -f movie1.mp4
, but it can open all other content from the same environment.
The problem in my case, is the uninstallation. Inno Setup does not support component selection to uninstall.
My strategy (in my mind at the time) is to present the user a custom form to select the content to uninstall. For example.
[X] Main Application
[X] Movie1 Full Title Description
[X] Movie2 Full Title Description
[X] Movie3 Full Title Description
With that way the common uninstall will work for every separate retail installation.
The problems
- How to create such a form
- How to scan the common shared folder i.e.
movies
for this example to find all installed content i.e.movie1.mp4
,movie2.mp4
, ..... - How to open and read the header of each movie to read some data like the full title to show it in the uninstallation procedure instead of the filename.
I used to write Pascal code at the DOS era but I now I am a C++/MFC programmer.
Any ideas, recommendations, strategies?
Best regards.
Inno Setup does not support partial uninstallations.
Once the uninstallation completes, your whole application with all installed components (movies) will be deleted.
What you can do is to present a custom form with movies list in the
InitializeUninstall
. If the user chooses to uninstall only (some) movies, but not whole application (the viewer), you delete the movies with your own code and abort the uninstallation (by returningFalse
from theInitializeUninstall
). If the user chooses to uninstall everything, you let the uninstallation complete.