I try to run same installer for fresh installation and upgrade.
In case it is an upgrade: some files and folders shouldn’t be copy and server.bat
shouldn’t be run.
I use the function as it has been answered on the question (Can Inno Setup respond differently to a new install and an update?) and I used same AppId
and defined the #SetupReg
as it shown, and install the app for first time, and everything is good, but when I searched Setup Log I found that:
Line 122: 2019-02-27 15:46:13.797 Creating new uninstall key: HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Uninstall\{FDDFBC15-7B5C-4580-AD69-F54B8087A52E}_is1
Then I searched Registry and above path doesn’t exist, but I found the actually SetupReg path in
HKLM\Softwares\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall\ {FDDFBC15-7B5C-4580-AD69-F54B8087A52E}_is1
I already defined it as script blow, the path in script was:
HKLM\ Software\Microsoft\Windows\CurrentVersion\Uninstall\" + AppId + "_is1
I edit MyApp.iss
and changed values of MyAppVersion
to "1.1.0"
and VersionInfoVersion
to 1.1.0
, and run installer again, I expected it will run an upgrade (files and folder which has check: not IsUpgrade
shouldn’t copy or run) and it will disable installation directory page. But nothing expected happen.
The function IsUpgrade
didn’t work successfully, files and folders which has check: not IsUpgrade
have been copied normally and overwrote the old one, even the server.bat
overwrote the old one and also run after installation finished.
What’s going wrong? Is it because of #SetupReg
or function IsUpgrade
or iss script?
#define MyAppName "Medfor"
#define MyAppVersion "1.0.0"
#define MyAppExeName "Medfor.exe"
#define AppId "{{FDDFBC15-7B5C-4580-AD69-F54B8087A52E}"
#define SetupReg "Software\Microsoft\Windows\CurrentVersion\Uninstall\" + AppId + "_is1"
#define SetupAppPathReg "Inno Setup: App Path"
[Setup]
AppId={#AppId}
AppName={#MyAppName}
AppVersion={#MyAppVersion}
[Files]
Source: "build\server.bat"; DestDir: "{app}"; Flags: ignoreversion; Check: not IsUpgrade
[Run]
Filename: "{app}\server.bat"; \
Flags: postinstall skipifsilent runascurrentuser waituntilterminated; \
Description: "{cm:LaunchProgram,{#StringChange(MyAppName, '&', '&&')}}"; \
Check: not IsUpgrade
[Code]
function IsUpgrade: Boolean;
var
S: string;
begin
Result :=
RegQueryStringValue(HKLM, '{#SetupReg}', '{#SetupAppPathReg}', S) or
RegQueryStringValue(HKCU, '{#SetupReg}', '{#SetupAppPathReg}', S);
end;
First Installation Log:
2019-02-27 15:45:48.996 Log opened. (Time zone: UTC+03:00)
2019-02-27 15:45:48.996 Setup version: Inno Setup version 5.6.1 (a)
2019-02-27 15:45:48.996 Original Setup EXE: C:\Users\user\Documents\Output\Medfor-setup.exe
2019-02-27 15:45:48.996 Setup command line: /SL5="$2307BA,9890028,58368,C:\Users\user\Documents\Output\Medfor-setup.exe" /SPAWNWND=$2B04B6 /NOTIFYWND=$390B4C
2019-02-27 15:45:48.997 Windows version: 6.3.9600 (NT platform: Yes)
2019-02-27 15:45:48.997 64-bit Windows: Yes
2019-02-27 15:45:48.997 Processor architecture: x64
2019-02-27 15:45:48.997 User privileges: Administrative
2019-02-27 15:45:48.999 64-bit install mode: No
2019-02-27 15:45:49.004 Created temporary directory: C:\Users\user\AppData\Local\Temp\is-IH9A3.tmp
2019-02-27 15:46:11.561 Starting the installation process.
2019-02-27 15:46:11.690 Creating directory: C:\Program Files (x86)\Medfor
2019-02-27 15:46:11.690 Creating directory: C:\Program Files (x86)\Medfor\App
2019-02-27 15:46:11.691 Creating directory: C:\Program Files (x86)\Medfor\App\sections
2019-02-27 15:46:11.691 Creating directory: C:\Program Files (x86)\Medfor\App\sections\templates_sections
2019-02-27 15:46:11.691 Creating directory: C:\Program Files (x86)\Medfor\App\sections\templates_sections\headers
2019-02-27 15:46:11.692 Creating directory: C:\Program Files (x86)\Medfor\App\sections\templates_sections\modals
2019-02-27 15:46:11.693 Creating directory: C:\Program Files (x86)\Medfor\App\templates
2019-02-27 15:46:11.693 Creating directory: C:\Program Files (x86)\Medfor\App\templates\errors
2019-02-27 15:46:11.694 Creating directory: C:\Program Files (x86)\Medfor\App\templates\menus
2019-02-27 15:46:11.694 Creating directory: C:\Program Files (x86)\Medfor\App\templates\modals
2019-02-27 15:46:11.695 Creating directory: C:\Program Files (x86)\Medfor\Uploads
2019-02-27 15:46:11.696 Directory for uninstall files: C:\Program Files (x86)\Medfor
2019-02-27 15:46:11.696 Creating new uninstall log: C:\Program Files (x86)\Medfor\unins000.dat
2019-02-27 15:46:11.701 -- File entry --
2019-02-27 15:46:11.702 Dest filename: C:\Program Files (x86)\Medfor\unins000.exe
2019-02-27 15:46:11.705 Time stamp of our file: 2019-02-27 15:45:48.834
2019-02-27 15:46:11.705 Installing the file.
2019-02-27 15:46:11.719 Uninstaller requires administrator: Yes
2019-02-27 15:46:11.720 Successfully installed the file.
2019-02-27 15:46:11.721 -- File entry --
2019-02-27 15:46:11.722 Dest filename: C:\Program Files (x86)\Medfor\mfcm90u.dll
2019-02-27 15:46:11.722 Time stamp of our file: 2018-11-25 14:38:14.000
2019-02-27 15:46:11.723 Installing the file.
2019-02-27 15:46:11.731 Successfully installed the file.
2019-02-27 15:46:11.731 -- File entry --
2019-02-27 15:46:11.732 Dest filename: C:\Program Files (x86)\Medfor\Microsoft.VC90.CRT.manifest
2019-02-27 15:46:11.733 Time stamp of our file: 2018-11-25 14:38:08.000
2019-02-27 15:46:11.733 Installing the file.
2019-02-27 15:46:11.735 Successfully installed the file.
2019-02-27 15:46:11.736 -- File entry --
2019-02-27 15:46:11.737 Dest filename: C:\Program Files (x86)\Medfor\Microsoft.VC90.MFC.manifest
2019-02-27 15:46:11.738 Time stamp of our file: 2018-11-25 14:38:14.000
2019-02-27 15:46:11.738 Installing the file.
2019-02-27 15:46:11.741 Successfully installed the file.
2019-02-27 15:46:11.741 -- File entry --
2019-02-27 15:46:11.743 Dest filename: C:\Program Files (x86)\Medfor\msvcm90.dll
2019-02-27 15:46:11.743 Time stamp of our file: 2018-11-25 14:38:08.000
2019-02-27 15:46:11.743 Installing the file.
2019-02-27 15:46:11.766 Successfully installed the file.
2019-02-27 15:46:11.766 -- File entry --
2019-02-27 15:46:11.767 Dest filename: C:\Program Files (x86)\Medfor\msvcp90.dll
2019-02-27 15:46:11.768 Time stamp of our file: 2018-11-25 14:38:08.000
2019-02-27 15:46:11.768 Installing the file.
2019-02-27 15:46:11.837 Successfully installed the file.
2019-02-27 15:46:11.837 -- File entry --
2019-02-27 15:46:11.839 Dest filename: C:\Program Files (x86)\Medfor\msvcr90.dll
2019-02-27 15:46:11.839 Time stamp of our file: 2018-11-25 14:38:08.000
2019-02-27 15:46:11.839 Installing the file.
2019-02-27 15:46:11.913 Successfully installed the file.
2019-02-27 15:46:11.914 -- File entry --
2019-02-27 15:46:11.914 Dest filename: C:\Program Files (x86)\Medfor\service.bat
2019-02-27 15:46:11.915 Time stamp of our file: 2018-12-16 16:53:52.000
2019-02-27 15:46:11.915 Installing the file.
2019-02-27 15:46:11.917 Successfully installed the file.
2019-02-27 15:46:11.917 -- File entry --
2019-02-27 15:46:11.918 Dest filename: C:\Program Files (x86)\Medfor\sqlite3.dll
2019-02-27 15:46:11.918 Time stamp of our file: 2018-11-25 14:38:26.000
2019-02-27 15:46:11.918 Installing the file.
2019-02-27 15:46:12.012 Successfully installed the file.
2019-02-27 15:46:12.012 -- File entry --
2019-02-27 15:46:12.013 Dest filename: C:\Program Files (x86)\Medfor\tcl85.dll
2019-02-27 15:46:12.013 Time stamp of our file: 2018-11-25 14:38:26.000
2019-02-27 15:46:12.013 Installing the file.
2019-02-27 15:46:12.143 Successfully installed the file.
2019-02-27 15:46:12.143 -- File entry --
2019-02-27 15:46:12.145 Dest filename: C:\Program Files (x86)\Medfor\medfor.dll
2019-02-27 15:46:12.145 Time stamp of our file: 2019-02-27 13:15:42.000
2019-02-27 15:46:12.145 Installing the file.
2019-02-27 15:46:12.148 Successfully installed the file.
2019-02-27 15:46:12.149 -- File entry --
2019-02-27 15:46:12.149 Dest filename: C:\Program Files (x86)\Medfor\Medfor.exe
2019-02-27 15:46:12.150 Time stamp of our file: 2018-10-29 02:05:20.000
2019-02-27 15:46:12.150 Installing the file.
2019-02-27 15:46:12.790 Successfully installed the file.
2019-02-27 15:46:12.791 -- File entry --
2019-02-27 15:46:12.791 Dest filename: C:\Program Files (x86)\Medfor\mfc90.dll
2019-02-27 15:46:12.792 Time stamp of our file: 2018-11-25 14:38:14.000
2019-02-27 15:46:12.792 Installing the file.
2019-02-27 15:46:13.287 Successfully installed the file.
2019-02-27 15:46:13.287 -- File entry --
2019-02-27 15:46:13.288 Dest filename: C:\Program Files (x86)\Medfor\mfc90u.dll
2019-02-27 15:46:13.288 Time stamp of our file: 2018-11-25 14:38:14.000
2019-02-27 15:46:13.288 Installing the file.
2019-02-27 15:46:13.541 Successfully installed the file.
2019-02-27 15:46:13.541 -- File entry --
2019-02-27 15:46:13.542 Dest filename: C:\Program Files (x86)\Medfor\mfcm90.dll
2019-02-27 15:46:13.542 Time stamp of our file: 2018-11-25 14:38:14.000
2019-02-27 15:46:13.542 Installing the file.
2019-02-27 15:46:13.549 Successfully installed the file.
2019-02-27 15:46:13.549 -- File entry --
2019-02-27 15:46:13.550 Dest filename: C:\Program Files (x86)\Medfor\App\templates\errors\403.html
2019-02-27 15:46:13.550 Time stamp of our file: 2018-11-21 16:21:04.000
2019-02-27 15:46:13.550 Installing the file.
2019-02-27 15:46:13.552 Successfully installed the file.
2019-02-27 15:46:13.552 -- File entry --
2019-02-27 15:46:13.553 Dest filename: C:\Program Files (x86)\Medfor\App\templates\errors\404.html
2019-02-27 15:46:13.553 Time stamp of our file: 2018-11-21 16:21:04.000
2019-02-27 15:46:13.553 Installing the file.
2019-02-27 15:46:13.555 Successfully installed the file.
2019-02-27 15:46:13.555 -- File entry --
2019-02-27 15:46:13.556 Dest filename: C:\Program Files (x86)\Medfor\Uploads\Capture.gif
2019-02-27 15:46:13.557 Time stamp of our file: 2018-07-31 21:51:14.000
2019-02-27 15:46:13.557 Installing the file.
2019-02-27 15:46:13.565 Successfully installed the file.
2019-02-27 15:46:13.566 -- Icon entry --
2019-02-27 15:46:13.566 Dest filename: C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Medfor.lnk
2019-02-27 15:46:13.568 Creating the icon.
2019-02-27 15:46:13.794 Successfully created the icon.
2019-02-27 15:46:13.797 Saving uninstall information.
2019-02-27 15:46:13.797 Deleting any uninstall keys left over from previous installs
2019-02-27 15:46:13.797 Creating new uninstall key: HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Uninstall\{FDDFBC15-7B5C-4580-AD69-F54B8087A52E}_is1
2019-02-27 15:46:13.797 Writing uninstall key values.
2019-02-27 15:46:13.961 Installation process succeeded.
2019-02-27 15:46:13.963 Need to restart Windows? No
2019-02-27 15:46:21.260 -- Run entry --
2019-02-27 15:46:21.260 Run as: Current user
2019-02-27 15:46:21.260 Type: Exec
2019-02-27 15:46:21.260 Filename: C:\Program Files (x86)\Medfor\service.bat
2019-02-27 15:46:27.225 Process exit code: 1
2019-02-27 15:46:27.225 -- Run entry --
2019-02-27 15:46:27.225 Run as: Original user
2019-02-27 15:46:27.225 Type: Exec
2019-02-27 15:46:27.225 Filename: C:\Program Files (x86)\Medfor\Medfor.exe
Second Installation Log (Expected Upgrade)
2019-02-27 16:42:48.069 Log opened. (Time zone: UTC+03:00)
2019-02-27 16:42:48.070 Setup version: Inno Setup version 5.6.1 (a)
2019-02-27 16:42:48.070 Original Setup EXE: C:\Users\user\Documents\Output\Medfor-1.1.0-setup.exe
2019-02-27 16:42:48.070 Setup command line: /SL5="$4A052C,9889159,58368,C:\Users\user\Documents\Output\Medfor-1.1.0-setup.exe" /SPAWNWND=$9C0140 /NOTIFYWND=$5F02BC
2019-02-27 16:42:48.070 Windows version: 6.3.9600 (NT platform: Yes)
2019-02-27 16:42:48.070 64-bit Windows: Yes
2019-02-27 16:42:48.071 Processor architecture: x64
2019-02-27 16:42:48.071 User privileges: Administrative
2019-02-27 16:42:48.074 64-bit install mode: No
2019-02-27 16:42:48.082 Created temporary directory: C:\Users\user\AppData\Local\Temp\is-Q7EVG.tmp
2019-02-27 16:43:13.652 Starting the installation process.
2019-02-27 16:43:13.662 Directory for uninstall files: C:\Program Files (x86)\Medfor
2019-02-27 16:43:13.662 Will append to existing uninstall log: C:\Program Files (x86)\Medfor\unins000.dat
2019-02-27 16:43:13.668 -- File entry --
2019-02-27 16:43:13.669 Dest filename: C:\Program Files (x86)\Medfor\unins000.exe
2019-02-27 16:43:13.673 Time stamp of our file: 2019-02-27 16:42:47.947
2019-02-27 16:43:13.673 Dest file exists.
2019-02-27 16:43:13.673 Time stamp of existing file: 2019-02-27 15:45:48.834
2019-02-27 16:43:13.673 Version of our file: 51.52.0.0
2019-02-27 16:43:13.674 Version of existing file: 51.52.0.0
2019-02-27 16:43:13.674 Installing the file.
2019-02-27 16:43:13.700 Uninstaller requires administrator: Yes
2019-02-27 16:43:13.700 Leaving temporary file in place for now.
2019-02-27 16:43:13.701 -- File entry --
2019-02-27 16:43:13.703 Dest filename: C:\Program Files (x86)\Medfor\mfcm90u.dll
2019-02-27 16:43:13.703 Time stamp of our file: 2018-11-25 14:38:14.000
2019-02-27 16:43:13.703 Dest file exists.
2019-02-27 16:43:13.703 Time stamp of existing file: 2018-11-25 14:38:14.000
2019-02-27 16:43:13.704 Installing the file.
2019-02-27 16:43:13.716 Successfully installed the file.
2019-02-27 16:43:13.716 -- File entry --
2019-02-27 16:43:13.718 Dest filename: C:\Program Files (x86)\Medfor\Microsoft.VC90.CRT.manifest
2019-02-27 16:43:13.719 Time stamp of our file: 2018-11-25 14:38:08.000
2019-02-27 16:43:13.719 Dest file exists.
2019-02-27 16:43:13.719 Time stamp of existing file: 2018-11-25 14:38:08.000
2019-02-27 16:43:13.719 Installing the file.
2019-02-27 16:43:13.724 Successfully installed the file.
2019-02-27 16:43:13.725 -- File entry --
2019-02-27 16:43:13.727 Dest filename: C:\Program Files (x86)\Medfor\Microsoft.VC90.MFC.manifest
2019-02-27 16:43:13.728 Time stamp of our file: 2018-11-25 14:38:14.000
2019-02-27 16:43:13.728 Dest file exists.
2019-02-27 16:43:13.728 Time stamp of existing file: 2018-11-25 14:38:14.000
2019-02-27 16:43:13.728 Installing the file.
2019-02-27 16:43:13.733 Successfully installed the file.
2019-02-27 16:43:13.734 -- File entry --
2019-02-27 16:43:13.735 Dest filename: C:\Program Files (x86)\Medfor\msvcm90.dll
2019-02-27 16:43:13.736 Time stamp of our file: 2018-11-25 14:38:08.000
2019-02-27 16:43:13.736 Dest file exists.
2019-02-27 16:43:13.736 Time stamp of existing file: 2018-11-25 14:38:08.000
2019-02-27 16:43:13.736 Installing the file.
2019-02-27 16:43:13.770 Successfully installed the file.
2019-02-27 16:43:13.771 -- File entry --
2019-02-27 16:43:13.773 Dest filename: C:\Program Files (x86)\Medfor\msvcp90.dll
2019-02-27 16:43:13.773 Time stamp of our file: 2018-11-25 14:38:08.000
2019-02-27 16:43:13.774 Dest file exists.
2019-02-27 16:43:13.774 Time stamp of existing file: 2018-11-25 14:38:08.000
2019-02-27 16:43:13.774 Installing the file.
2019-02-27 16:43:13.870 Successfully installed the file.
2019-02-27 16:43:13.871 -- File entry --
2019-02-27 16:43:13.872 Dest filename: C:\Program Files (x86)\Medfor\msvcr90.dll
2019-02-27 16:43:13.873 Time stamp of our file: 2018-11-25 14:38:08.000
2019-02-27 16:43:13.873 Dest file exists.
2019-02-27 16:43:13.873 Time stamp of existing file: 2018-11-25 14:38:08.000
2019-02-27 16:43:13.873 Installing the file.
2019-02-27 16:43:13.977 Successfully installed the file.
2019-02-27 16:43:13.978 -- File entry --
2019-02-27 16:43:13.980 Dest filename: C:\Program Files (x86)\Medfor\server.bat
2019-02-27 16:43:13.981 Time stamp of our file: 2019-02-27 16:37:22.000
2019-02-27 16:43:13.981 Dest file exists.
2019-02-27 16:43:13.981 Time stamp of existing file: 2019-02-27 16:40:59.984
2019-02-27 16:43:13.981 Installing the file.
2019-02-27 16:43:13.985 Successfully installed the file.
2019-02-27 16:43:13.986 -- File entry --
2019-02-27 16:43:13.987 Dest filename: C:\Program Files (x86)\Medfor\sqlite3.dll
2019-02-27 16:43:13.988 Time stamp of our file: 2018-11-25 14:38:26.000
2019-02-27 16:43:13.988 Dest file exists.
2019-02-27 16:43:13.988 Time stamp of existing file: 2018-11-25 14:38:26.000
2019-02-27 16:43:13.988 Installing the file.
2019-02-27 16:43:14.159 Successfully installed the file.
2019-02-27 16:43:14.193 -- File entry --
2019-02-27 16:43:14.194 Dest filename: C:\Program Files (x86)\Medfor\tcl85.dll
2019-02-27 16:43:14.195 Time stamp of our file: 2018-11-25 14:38:26.000
2019-02-27 16:43:14.195 Dest file exists.
2019-02-27 16:43:14.195 Time stamp of existing file: 2018-11-25 14:38:26.000
2019-02-27 16:43:14.195 Installing the file.
2019-02-27 16:43:14.421 Successfully installed the file.
2019-02-27 16:43:14.422 -- File entry --
2019-02-27 16:43:14.424 Dest filename: C:\Program Files (x86)\Medfor\medfor.dll
2019-02-27 16:43:14.424 Time stamp of our file: 2019-02-27 13:15:42.000
2019-02-27 16:43:14.425 Dest file exists.
2019-02-27 16:43:14.425 Time stamp of existing file: 2019-02-27 13:15:42.000
2019-02-27 16:43:14.425 Installing the file.
2019-02-27 16:43:14.431 Successfully installed the file.
2019-02-27 16:43:14.431 -- File entry --
2019-02-27 16:43:14.433 Dest filename: C:\Program Files (x86)\Medfor\Medfor.exe
2019-02-27 16:43:14.434 Time stamp of our file: 2018-10-29 02:05:20.000
2019-02-27 16:43:14.434 Dest file exists.
2019-02-27 16:43:14.434 Time stamp of existing file: 2018-10-29 02:05:20.000
2019-02-27 16:43:14.434 Installing the file.
2019-02-27 16:43:15.386 Successfully installed the file.
2019-02-27 16:43:15.387 -- File entry --
2019-02-27 16:43:15.388 Dest filename: C:\Program Files (x86)\Medfor\mfc90.dll
2019-02-27 16:43:15.389 Time stamp of our file: 2018-11-25 14:38:14.000
2019-02-27 16:43:15.389 Dest file exists.
2019-02-27 16:43:15.389 Time stamp of existing file: 2018-11-25 14:38:14.000
2019-02-27 16:43:15.389 Installing the file.
2019-02-27 16:43:16.087 Successfully installed the file.
2019-02-27 16:43:16.088 -- File entry --
2019-02-27 16:43:16.089 Dest filename: C:\Program Files (x86)\Medfor\mfc90u.dll
2019-02-27 16:43:16.089 Time stamp of our file: 2018-11-25 14:38:14.000
2019-02-27 16:43:16.089 Dest file exists.
2019-02-27 16:43:16.089 Time stamp of existing file: 2018-11-25 14:38:14.000
2019-02-27 16:43:16.090 Installing the file.
2019-02-27 16:43:16.432 Successfully installed the file.
2019-02-27 16:43:16.432 -- File entry --
2019-02-27 16:43:16.434 Dest filename: C:\Program Files (x86)\Medfor\mfcm90.dll
2019-02-27 16:43:16.435 Time stamp of our file: 2018-11-25 14:38:14.000
2019-02-27 16:43:16.435 Dest file exists.
2019-02-27 16:43:16.435 Time stamp of existing file: 2018-11-25 14:38:14.000
2019-02-27 16:43:16.435 Installing the file.
2019-02-27 16:43:16.450 Successfully installed the file.
2019-02-27 16:43:16.450 -- File entry --
2019-02-27 16:43:16.451 Dest filename: C:\Program Files (x86)\Medfor\App\templates\errors\403.html
2019-02-27 16:43:16.452 Time stamp of our file: 2018-11-21 16:21:04.000
2019-02-27 16:43:16.452 Dest file exists.
2019-02-27 16:43:16.452 Time stamp of existing file: 2018-11-21 16:21:04.000
2019-02-27 16:43:16.452 Installing the file.
2019-02-27 16:43:16.455 Successfully installed the file.
2019-02-27 16:43:16.456 -- File entry --
2019-02-27 16:43:16.457 Dest filename: C:\Program Files (x86)\Medfor\App\templates\errors\404.html
2019-02-27 16:43:16.457 Time stamp of our file: 2018-11-21 16:21:04.000
2019-02-27 16:43:16.457 Dest file exists.
2019-02-27 16:43:16.457 Time stamp of existing file: 2018-11-21 16:21:04.000
2019-02-27 16:43:16.457 Installing the file.
2019-02-27 16:43:16.460 Successfully installed the file.
2019-02-27 16:43:16.460 -- File entry --
2019-02-27 16:43:16.461 Dest filename: C:\Program Files (x86)\Medfor\Uploads\Capture.gif
2019-02-27 16:43:16.462 Time stamp of our file: 2018-07-31 21:51:14.000
2019-02-27 16:43:16.462 Dest file exists.
2019-02-27 16:43:16.462 Time stamp of existing file: 2018-07-31 21:51:14.000
2019-02-27 16:43:16.462 Installing the file.
2019-02-27 16:43:16.478 Successfully installed the file.
2019-02-27 16:43:16.480 -- Icon entry --
2019-02-27 16:43:16.480 Dest filename: C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Medfor.lnk
2019-02-27 16:43:16.483 Creating the icon.
2019-02-27 16:43:16.630 Successfully created the icon.
2019-02-27 16:43:16.634 Saving uninstall information.
2019-02-27 16:43:16.634 Renaming uninstaller.
2019-02-27 16:43:16.635 Deleting any uninstall keys left over from previous installs
2019-02-27 16:43:16.636 Creating new uninstall key: HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Uninstall\{FDDFBC15-7B5C-4580-AD69-F54B8087A52E}_is1
2019-02-27 16:43:16.637 Writing uninstall key values.
2019-02-27 16:43:16.828 Installation process succeeded.
2019-02-27 16:43:16.830 Need to restart Windows? No
2019-02-27 16:43:21.677 -- Run entry --
2019-02-27 16:43:21.677 Run as: Current user
2019-02-27 16:43:21.677 Type: Exec
2019-02-27 16:43:21.677 Filename: C:\Program Files (x86)\Medfor\server.bat
2019-02-27 16:43:22.055 Process exit code: 0
2019-02-27 16:43:22.055 -- Run entry --
2019-02-27 16:43:22.055 Run as: Original user
2019-02-27 16:43:22.055 Type: Exec
2019-02-27 16:43:22.055 Filename: C:\Program Files (x86)\Medfor\Medfor.exe
That's because your "AddId" is
{xxx}
, not{{xxx}
(check the registry key path in your question). The double curly bracket is needed inAppId
directive, as in Inno Setup directives a curly bracket have a special meaning (for constants). If you want to use a curly bracket literally, you have to double it.But in Pascal Script code, a curly bracket has no special meaning. So if you use two, your Pascal Script code will explicitly look for
{{xxx}
in the registry. And naturally, it won't find it there, as there's{xxx}
.One way to solve this (without duplicating
xxx
between the directive and the code) is by doubling the curly bracket using preprocessor in theAppId
directive only: