user3295980
user3295980

Reputation:

Inno Setup Remove version number from "Setup has detected that ... is currently running"

I've added the line AppMutex={#MyAppName} to my InnoSetup script, and #MyAppName does NOT include the version number. However, when my Setup.exe runs, it says "Your App v1.01 is already running" (or whatever) with the version number, which I don't want. Is there a way to have the message NOT show the version number?

Reason: Say I'm running v1.00 of my app, and I launch "MyApp_101_Setup.exe" (made with Inno Setup). The message shown is "Your App v1.01 is already running" which is NOT true, I'm trying to install v1.01 while v1.00 is running. This can cause confusion for my users.

Any tips? Thanks! :)

Upvotes: 0

Views: 853

Answers (1)

Martin Prikryl
Martin Prikryl

Reputation: 202098

You are wrong.

The message is:

SetupAppRunningError=Setup has detected that %1 is currently running.%n%nPlease close all instances of it now, then click OK to continue, or Cancel to exit.

Where the %1 is replaced by value of the AppName directive:

ExpandedAppName := ExpandConst(SetupHeader.AppName);

...

{ Check if app is running }
while CheckForMutexes(ExpandedAppMutex) do
  if LoggedMsgBox(FmtSetupMessage1(msgSetupAppRunningError, ExpandedAppName),
     SetupMessages[msgSetupAppTitle], mbError, MB_OKCANCEL, True, IDCANCEL) <> IDOK then
    Abort;

So the version is included in the message, only if you have included the version in the AppName directive. What is wrong, the directive value may not include the version, as the documentation says:

Do not include the version number, as that is defined by the AppVersion and/or AppVerName directives.

Upvotes: 1

Related Questions