Tracking Installations & Uninstallations into your Inno Installer

Are you interested in knowing how many users install and uninstall your softwarei through your Inno Installer? You came to the right place! To get started download the DeskMetrics Analytics Inno Setup DLL ANSI or Unicode.

How to know your version of Inno Setup

To know the version of your Inno Setup you just need to check the title of the application. (u) stands for Unicode and (a) for ANSI. Take a look at the image below:

Checking Inno Version

Sample Configuration File

Below is a sample configuration file that should be pretty straightfoward.

[Files]
;Application
Source: "DeskMetricsI.dll";   DestDir: "{app}"; Flags: ignoreversion;

[UninstallDelete]
Name: {app}; Type: filesandordirs

[Code]
const
  FAppID         = 'YOUR APPLICATION ID';
  FAppVersion = '1.0';

function DeskMetricsTrackInstallation(FApplicationID: string; FApplicationVersion: string): Integer; external 'DeskMetricsTrackInstallation@files:DeskMetricsI.dll stdcall';
function DeskMetricsTrackUninstallation(FApplicationID: string; FApplicationVersion: string): Integer; external 'DeskMetricsTrackUninstallation@{app}\DeskMetricsI.dll stdcall uninstallonly';

function NextButtonClick(CurPageID: Integer): Boolean;
var
  FStatus: Integer;
begin
  Result := True;

  if CurPageID = wpWelcome then
    FStatus := DeskMetricsTrackInstallation(FAppID, FAppVersion);
end;

procedure InitializeUninstallProgressForm();
begin
  try
    DeskMetricsTrackUninstallation(FAppID, FAppVersion);
    UnloadDLL(ExpandConstant('{app}\DeskMetricsI.dll'));
  except
  end;
end;

You’re done!