Executing multiple uninstallers from a single master uninstaller

96 views
Skip to first unread message

JoeJohnson

unread,
Sep 11, 2023, 6:51:34 PM9/11/23
to innosetup
0

I have a master installer that executes a bunch of installers (all made with Inno Setup). Each installed app has its own uninstaller, and there is also an uninstaller created from the master installer.

The master installer doesn't do anything else besides running the other installers but it does produce an uninstaller for itself.

Is there anyway to uninstall all the apps when this uninstaller is executed?

Here's the example .iss file for the master installer, which runs two other installers:


#define MyAppName "MasterInstaller"
#define MyAppVersion "1900.1.11"
#define MyAppPublisher "Myself"

[Setup]
AppId={{C0CBD111-111A-11B1-111A-965A8921F38A}
AppName={#MyAppName}
AppVersion={#MyAppVersion}
;AppVerName={#MyAppName} {#MyAppVersion}
AppPublisher={#MyAppPublisher}
DefaultDirName=C:\Desktop\test\{#MyAppName}
DisableDirPage=no
DisableProgramGroupPage=yes
;PrivilegesRequired=lowest
Compression=lzma
SolidCompression=yes
OutputBaseFilename=MasterInstaller

[Types]
Name: "custom"; Description: "Custom installation"; Flags: iscustom

[Components]
Name: WpfApp; Description: "WpfApp"; Types: custom
Name: WinFormsApp; Description: "WinFormsApp"; Types: custom

[Files]
Source: "C:\Desktop\innoscripts\WpfAppInstaller.exe"; DestDir: "{app}"; Components: WpfApp; Flags: deleteafterinstall
Source: "C:\Desktop\innoscripts\WinFormsAppInstaller.exe"; DestDir: "{app}"; Components: WinFormsApp; Flags: deleteafterinstall

[Run]
Filename: "{app}\WpfAppInstaller.exe"; Parameters: "/verysilent /DIR={app}"; Flags: waituntilterminated skipifdoesntexist; StatusMsg: "Installing WpfApp"
Filename: "{app}\WinFormsAppInstaller.exe"; Parameters: "/verysilent /DIR={app}"; Flags: waituntilterminated skipifdoesntexist; StatusMsg: "Installing WinFormsApp..."

If it matters, some of these installers install their app in a subfolder of the root folder specified by the master installer.

Wilenty org

unread,
Sep 12, 2023, 6:18:26 PM9/12/23
to innosetup
Hello JoeJohnson,
please create a minimal reproducible example, but not create another example of what you asked before: https://groups.google.com/g/innosetup/c/OS-zNLcTeic ("Force app to always install in a nested folder").

Before you wrote:
'
Desktop
-- Test
------ MediaPlayers
----------- Spotify
----------- VLC Player
------ Browsers
----------- Chrome
'

But, in current example you wrote:
'
{Run]

Filename: "{app}\WpfAppInstaller.exe"; Parameters: "/verysilent /DIR={app}"; Flags: waituntilterminated skipifdoesntexist; StatusMsg: "Installing WpfApp"
Filename: "{app}\WinFormsAppInstaller.exe"; Parameters: "/verysilent /DIR={app}"; Flags: waituntilterminated skipifdoesntexist; StatusMsg: "Installing WinFormsApp..."
'

Above example will have "unins000.exe", and "unins001.exe" (etc.) in the same folder, so how we can guess which uninstall-file is "connected" to which uninstaller?

I will show you how the minimal reproducible example should looks like (attachment): Force_app.7z
For first compile the "Sub-Installer*", and then the "Components.iss" or "Tasks.iss".

Greetings,
Wilenty
Force_app.7z
Reply all
Reply to author
Forward
0 new messages