Reputation: 2324
I've got some additional files to install some runtime engines that are required for my application (Access database engine and Crystal Reports runtimes).
I'm setting them to use the deleteafterinstall
flag, so once they've been installed and the application install is complete, it should delete the files, however, I've tested it on my work PC and my personal laptop and despite the application and runtimes being installed without any issues, the runtimes installers aren't being deleted.
[Files]
Source: "\\my_Directory\AccessDatabaseEngine.exe"; DestDir: "{app}"; AfterInstall: RunAccessInstaller; Flags: deleteafterinstall;
[Code]
procedure RunAccessInstaller;
var
ResultCode: Integer;
begin
if not Exec(ExpandConstant('{app}\AccessDatabaseEngine.exe'), '', '', SW_SHOWNORMAL,
ewWaitUntilTerminated, ResultCode)
then
MsgBox('Microsoft Office Engine installer failed to run!' + #13#10 +
SysErrorMessage(ResultCode), mbError, MB_OK);
end;
After removing AfterInstall: RunAccessInstaller
along with the RunAccessInstaller
procedure itself, this still doesn't delete the file.
The script now appears as below, so it seems as though the deleteafterinstall
flag isn't working.
[Files]
Source: "\\server\common\David\Iconysis Agent Installer Files\AccessDatabaseEngine.exe"; _
DestDir: "{app}"; Flags: deleteafterinstall;
The full log file when running a fresh install onto my Desktop (installation run without installing AccessDatabaseEngine.exe
)
2018-02-13 14:46:30.236 Log opened. (Time zone: UTC+00:00)
2018-02-13 14:46:30.236 Setup version: Inno Setup version 5.5.9 (a)
2018-02-13 14:46:30.236 Original Setup EXE: \server\common\David\IAInstaller\IAInstaller.exe
2018-02-13 14:46:30.237 Setup command line: /SL5="$1B0596,77447651,97792,\server\common\David\IAInstaller\IAInstaller.exe" /SPAWNWND=$2F0524 /NOTIFYWND=$D0576
2018-02-13 14:46:30.237 Windows version: 10.0.15063 (NT platform: Yes)
2018-02-13 14:46:30.237 64-bit Windows: Yes
2018-02-13 14:46:30.237 Processor architecture: x64
2018-02-13 14:46:30.237 User privileges: Administrative
2018-02-13 14:46:30.246 64-bit install mode: No
2018-02-13 14:46:30.249 Created temporary directory: C:\Users\admin\AppData\Local\Temp\is-A1880.tmp
2018-02-13 14:46:53.285 Starting the installation process.
2018-02-13 14:46:53.287 Creating directory: C:\Users\admin\Desktop\Iconysis Agent
2018-02-13 14:46:53.288 Directory for uninstall files: C:\Users\admin\Desktop\Iconysis Agent\Uninstaller
2018-02-13 14:46:53.288 Creating directory: C:\Users\admin\Desktop\Iconysis Agent\Uninstaller
2018-02-13 14:46:53.288 Creating new uninstall log: C:\Users\admin\Desktop\Iconysis Agent\Uninstaller\unins000.dat
2018-02-13 14:46:53.290 -- File entry --
2018-02-13 14:46:53.290 Dest filename: C:\Users\admin\Desktop\Iconysis Agent\Uninstaller\unins000.exe
2018-02-13 14:46:53.291 Time stamp of our file: 2018-02-13 14:46:30.175
2018-02-13 14:46:53.291 Installing the file.
2018-02-13 14:46:53.294 Uninstaller requires administrator: Yes
2018-02-13 14:46:53.295 Successfully installed the file.
2018-02-13 14:46:53.296 -- File entry --
2018-02-13 14:46:53.296 Dest filename: C:\Users\admin\Desktop\Iconysis Agent\Iconysis Agent.exe
2018-02-13 14:46:53.296 Time stamp of our file: 2018-02-09 16:11:34.000
2018-02-13 14:46:53.296 Installing the file.
2018-02-13 14:46:53.369 Successfully installed the file.
2018-02-13 14:46:53.369 -- File entry --
2018-02-13 14:46:53.369 Dest filename: C:\Users\admin\Desktop\Iconysis Agent\AccessDatabaseEngine.exe
2018-02-13 14:46:53.369 Time stamp of our file: 2017-05-18 09:37:06.000
2018-02-13 14:46:53.370 Installing the file.
2018-02-13 14:46:55.579 Successfully installed the file.
2018-02-13 14:46:55.579 -- File entry --
2018-02-13 14:46:55.580 Dest filename: C:\Users\admin\Desktop\Iconysis Agent\CRRuntime_12_2_mlb.msi
2018-02-13 14:46:55.580 Time stamp of our file: 2017-09-15 14:57:46.000
2018-02-13 14:46:55.580 Installing the file.
2018-02-13 14:46:59.603 Successfully installed the file.
2018-02-13 14:46:59.604 -- File entry --
2018-02-13 14:46:59.604 Dest filename: C:\Users\admin\Desktop\Iconysis Agent\Iconysis Agent\Iconysis Agent.pdb
2018-02-13 14:46:59.604 Time stamp of our file: 2017-09-06 11:22:30.000
2018-02-13 14:46:59.604 Installing the file.
2018-02-13 14:46:59.604 Creating directory: C:\Users\admin\Desktop\Iconysis Agent\Iconysis Agent
2018-02-13 14:46:59.649 Successfully installed the file.
2018-02-13 14:46:59.649 -- File entry --
2018-02-13 14:46:59.649 Dest filename: C:\Users\admin\Desktop\Iconysis Agent\Iconysis Agent\ImportExportGuide.txt
2018-02-13 14:46:59.650 Time stamp of our file: 2017-03-03 13:37:50.000
2018-02-13 14:46:59.650 Installing the file.
2018-02-13 14:46:59.651 Successfully installed the file.
2018-02-13 14:46:59.651 -- File entry --
2018-02-13 14:46:59.652 Dest filename: C:\Users\admin\Desktop\Iconysis Agent\Iconysis Agent\Infragistics.Shared.v5.1.dll
2018-02-13 14:46:59.652 Time stamp of our file: 2005-02-14 16:19:44.000
2018-02-13 14:46:59.652 Installing the file.
2018-02-13 14:46:59.662 Successfully installed the file.
2018-02-13 14:46:59.662 -- File entry --
2018-02-13 14:46:59.663 Dest filename: C:\Users\admin\Desktop\Iconysis Agent\Iconysis Agent\Infragistics.Win.UltraWinGrid.v5.1.dll
2018-02-13 14:46:59.663 Time stamp of our file: 2005-02-15 12:13:28.000
2018-02-13 14:46:59.663 Installing the file.
2018-02-13 14:46:59.717 Successfully installed the file.
2018-02-13 14:46:59.717 -- File entry --
2018-02-13 14:46:59.718 Dest filename: C:\Users\admin\Desktop\Iconysis Agent\Iconysis Agent\Infragistics.Win.v5.1.dll
2018-02-13 14:46:59.718 Time stamp of our file: 2005-02-14 16:21:46.000
2018-02-13 14:46:59.718 Installing the file.
2018-02-13 14:46:59.782 Successfully installed the file.
2018-02-13 14:46:59.783 -- File entry --
2018-02-13 14:46:59.783 Dest filename: C:\Users\admin\Desktop\Iconysis Agent\Iconysis Agent\README.txt
2018-02-13 14:46:59.783 Time stamp of our file: 2018-02-05 15:04:58.000
2018-02-13 14:46:59.783 Installing the file.
2018-02-13 14:46:59.785 Successfully installed the file.
2018-02-13 14:46:59.785 -- File entry --
2018-02-13 14:46:59.785 Dest filename: C:\Users\admin\Desktop\Iconysis Agent\Iconysis Agent\Databases\comm_db-TEST.mdb
2018-02-13 14:46:59.785 Time stamp of our file: 2018-02-01 11:30:30.000
2018-02-13 14:46:59.785 Installing the file.
2018-02-13 14:46:59.785 Creating directory: C:\Users\admin\Desktop\Iconysis Agent\Iconysis Agent\Databases
2018-02-13 14:47:00.028 Successfully installed the file.
2018-02-13 14:47:00.029 -- File entry --
2018-02-13 14:47:00.029 Dest filename: C:\Users\admin\Desktop\Iconysis Agent\Iconysis Agent\Databases\comm_db.mdb
2018-02-13 14:47:00.029 Time stamp of our file: 2018-02-01 11:30:14.000
2018-02-13 14:47:00.029 Installing the file.
2018-02-13 14:47:00.270 Successfully installed the file.
2018-02-13 14:47:00.271 -- File entry --
2018-02-13 14:47:00.271 Dest filename: C:\Users\admin\Desktop\Iconysis Agent\Iconysis Agent\Reports\BIACC.rpt
2018-02-13 14:47:00.271 Time stamp of our file: 2017-09-22 16:31:58.000
2018-02-13 14:47:00.271 Installing the file.
2018-02-13 14:47:00.271 Creating directory: C:\Users\admin\Desktop\Iconysis Agent\Iconysis Agent\Reports
2018-02-13 14:47:00.276 Successfully installed the file.
2018-02-13 14:47:00.277 -- File entry --
2018-02-13 14:47:00.277 Dest filename: C:\Users\admin\Desktop\Iconysis Agent\Iconysis Agent\Reports\BIACCAT.rpt
2018-02-13 14:47:00.277 Time stamp of our file: 2017-09-21 13:20:00.000
2018-02-13 14:47:00.277 Installing the file.
2018-02-13 14:47:00.282 Successfully installed the file.
2018-02-13 14:47:00.282 -- File entry --
2018-02-13 14:47:00.283 Dest filename: C:\Users\admin\Desktop\Iconysis Agent\Iconysis Agent\Reports\BIACPC.rpt
2018-02-13 14:47:00.283 Time stamp of our file: 2017-09-21 13:20:00.000
2018-02-13 14:47:00.283 Installing the file.
2018-02-13 14:47:00.287 Successfully installed the file.
2018-02-13 14:47:00.288 -- File entry --
2018-02-13 14:47:00.288 Dest filename: C:\Users\admin\Desktop\Iconysis Agent\Iconysis Agent\Reports\BIACPPC.rpt
2018-02-13 14:47:00.288 Time stamp of our file: 2017-09-22 16:32:16.000
2018-02-13 14:47:00.288 Installing the file.
2018-02-13 14:47:00.293 Successfully installed the file.
2018-02-13 14:47:00.293 -- File entry --
2018-02-13 14:47:00.293 Dest filename: C:\Users\admin\Desktop\Iconysis Agent\Iconysis Agent\Reports\BIACT.rpt
2018-02-13 14:47:00.293 Time stamp of our file: 2017-09-22 16:31:40.000
2018-02-13 14:47:00.293 Installing the file.
2018-02-13 14:47:00.297 Successfully installed the file.
2018-02-13 14:47:00.297 -- File entry --
2018-02-13 14:47:00.298 Dest filename: C:\Users\admin\Desktop\Iconysis Agent\Iconysis Agent\Reports\BIACTOT.rpt
2018-02-13 14:47:00.298 Time stamp of our file: 2017-09-22 16:31:06.000
2018-02-13 14:47:00.298 Installing the file.
2018-02-13 14:47:00.302 Successfully installed the file.
2018-02-13 14:47:00.302 -- File entry --
2018-02-13 14:47:00.302 Dest filename: C:\Users\admin\Desktop\Iconysis Agent\Iconysis Agent\Reports\BICES.rpt
2018-02-13 14:47:00.303 Time stamp of our file: 2017-03-13 12:45:22.000
2018-02-13 14:47:00.303 Installing the file.
2018-02-13 14:47:00.307 Successfully installed the file.
2018-02-13 14:47:00.307 -- File entry --
2018-02-13 14:47:00.308 Dest filename: C:\Users\admin\Desktop\Iconysis Agent\Iconysis Agent\Reports\BICF.rpt
2018-02-13 14:47:00.308 Time stamp of our file: 2017-09-22 09:58:00.000
2018-02-13 14:47:00.308 Installing the file.
2018-02-13 14:47:00.312 Successfully installed the file.
2018-02-13 14:47:00.312 -- File entry --
2018-02-13 14:47:00.312 Dest filename: C:\Users\admin\Desktop\Iconysis Agent\Iconysis Agent\Reports\CancelledNote.rpt
2018-02-13 14:47:00.313 Time stamp of our file: 2017-07-26 13:41:46.000
2018-02-13 14:47:00.313 Installing the file.
2018-02-13 14:47:00.319 Successfully installed the file.
2018-02-13 14:47:00.320 -- File entry --
2018-02-13 14:47:00.320 Dest filename: C:\Users\admin\Desktop\Iconysis Agent\Iconysis Agent\Reports\CRDC.rpt
2018-02-13 14:47:00.320 Time stamp of our file: 2017-03-01 10:17:30.000
2018-02-13 14:47:00.320 Installing the file.
2018-02-13 14:47:00.326 Successfully installed the file.
2018-02-13 14:47:00.326 -- File entry --
2018-02-13 14:47:00.326 Dest filename: C:\Users\admin\Desktop\Iconysis Agent\Iconysis Agent\Reports\CRDU.rpt
2018-02-13 14:47:00.326 Time stamp of our file: 2017-09-22 16:29:20.000
2018-02-13 14:47:00.326 Installing the file.
2018-02-13 14:47:00.330 Successfully installed the file.
2018-02-13 14:47:00.331 -- File entry --
2018-02-13 14:47:00.331 Dest filename: C:\Users\admin\Desktop\Iconysis Agent\Iconysis Agent\Reports\CRID.rpt
2018-02-13 14:47:00.331 Time stamp of our file: 2018-01-26 14:04:00.000
2018-02-13 14:47:00.331 Installing the file.
2018-02-13 14:47:00.357 Successfully installed the file.
2018-02-13 14:47:00.357 -- File entry --
2018-02-13 14:47:00.358 Dest filename: C:\Users\admin\Desktop\Iconysis Agent\Iconysis Agent\Reports\CRISD.rpt
2018-02-13 14:47:00.358 Time stamp of our file: 2017-06-09 11:01:32.000
2018-02-13 14:47:00.358 Installing the file.
2018-02-13 14:47:00.362 Successfully installed the file.
2018-02-13 14:47:00.362 -- File entry --
2018-02-13 14:47:00.362 Dest filename: C:\Users\admin\Desktop\Iconysis Agent\Iconysis Agent\Reports\CRISF.rpt
2018-02-13 14:47:00.363 Time stamp of our file: 2018-01-26 14:04:00.000
2018-02-13 14:47:00.363 Installing the file.
2018-02-13 14:47:00.377 Successfully installed the file.
2018-02-13 14:47:00.377 -- File entry --
2018-02-13 14:47:00.377 Dest filename: C:\Users\admin\Desktop\Iconysis Agent\Iconysis Agent\Reports\CRVAT.rpt
2018-02-13 14:47:00.378 Time stamp of our file: 2017-06-09 11:02:48.000
2018-02-13 14:47:00.378 Installing the file.
2018-02-13 14:47:00.381 Successfully installed the file.
2018-02-13 14:47:00.381 -- File entry --
2018-02-13 14:47:00.382 Dest filename: C:\Users\admin\Desktop\Iconysis Agent\Iconysis Agent\Reports\customerInfoReport.rpt
2018-02-13 14:47:00.382 Time stamp of our file: 2017-07-18 16:16:00.000
2018-02-13 14:47:00.382 Installing the file.
2018-02-13 14:47:00.386 Successfully installed the file.
2018-02-13 14:47:00.386 -- File entry --
2018-02-13 14:47:00.387 Dest filename: C:\Users\admin\Desktop\Iconysis Agent\Iconysis Agent\Reports\DaysModificationsCondensed.rpt
2018-02-13 14:47:00.387 Time stamp of our file: 2017-07-17 09:47:00.000
2018-02-13 14:47:00.387 Installing the file.
2018-02-13 14:47:00.390 Successfully installed the file.
2018-02-13 14:47:00.390 -- File entry --
2018-02-13 14:47:00.391 Dest filename: C:\Users\admin\Desktop\Iconysis Agent\Iconysis Agent\Reports\DaysModificationsLines.rpt
2018-02-13 14:47:00.391 Time stamp of our file: 2017-08-01 10:45:10.000
2018-02-13 14:47:00.391 Installing the file.
2018-02-13 14:47:00.395 Successfully installed the file.
2018-02-13 14:47:00.395 -- File entry --
2018-02-13 14:47:00.395 Dest filename: C:\Users\admin\Desktop\Iconysis Agent\Iconysis Agent\Reports\MJGCustConf.rpt
2018-02-13 14:47:00.395 Time stamp of our file: 2017-03-01 11:04:42.000
2018-02-13 14:47:00.395 Installing the file.
2018-02-13 14:47:00.399 Successfully installed the file.
2018-02-13 14:47:00.400 -- File entry --
2018-02-13 14:47:00.400 Dest filename: C:\Users\admin\Desktop\Iconysis Agent\Iconysis Agent\Reports\MJGOrderCancelledNotification.rpt
2018-02-13 14:47:00.400 Time stamp of our file: 2017-03-01 11:06:38.000
2018-02-13 14:47:00.400 Installing the file.
2018-02-13 14:47:00.404 Successfully installed the file.
2018-02-13 14:47:00.404 -- File entry --
2018-02-13 14:47:00.404 Dest filename: C:\Users\admin\Desktop\Iconysis Agent\Iconysis Agent\Reports\MJGOrderCancelledOneAddress.rpt
2018-02-13 14:47:00.405 Time stamp of our file: 2017-03-01 11:06:58.000
2018-02-13 14:47:00.405 Installing the file.
2018-02-13 14:47:00.408 Successfully installed the file.
2018-02-13 14:47:00.408 -- File entry --
2018-02-13 14:47:00.409 Dest filename: C:\Users\admin\Desktop\Iconysis Agent\Iconysis Agent\Reports\MJGRevisedNoteCust.rpt
2018-02-13 14:47:00.409 Time stamp of our file: 2017-03-01 11:07:30.000
2018-02-13 14:47:00.409 Installing the file.
2018-02-13 14:47:00.412 Successfully installed the file.
2018-02-13 14:47:00.412 -- File entry --
2018-02-13 14:47:00.540 Dest filename: C:\Users\admin\Desktop\Iconysis Agent\Iconysis Agent\Reports\VVQROP.rpt
2018-02-13 14:47:00.540 Time stamp of our file: 2017-09-21 13:19:00.000
2018-02-13 14:47:00.540 Installing the file.
2018-02-13 14:47:00.543 Successfully installed the file.
2018-02-13 14:47:00.544 -- File entry --
2018-02-13 14:47:00.544 Dest filename: C:\Users\admin\Desktop\Iconysis Agent\AccessDatabaseEngine.exe
2018-02-13 14:47:00.544 Time stamp of our file: 2017-05-18 09:37:06.000
2018-02-13 14:47:00.544 Dest file exists.
2018-02-13 14:47:00.544 Time stamp of existing file: 2017-05-18 09:37:06.000
2018-02-13 14:47:00.544 Version of our file: 12.0.4518.1014
2018-02-13 14:47:00.637 Version of existing file: 12.0.4518.1014
2018-02-13 14:47:00.637 Same version. Skipping.
2018-02-13 14:47:00.637 -- Icon entry --
2018-02-13 14:47:00.638 Dest filename: C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Iconysis Agent.lnk
2018-02-13 14:47:00.638 Creating the icon.
2018-02-13 14:47:00.648 Successfully created the icon.
2018-02-13 14:47:00.698 Installation process succeeded.
2018-02-13 14:47:00.702 Need to restart Windows? No
Upvotes: 0
Views: 610
Reputation: 202474
There are two references to AccessDatabaseEngine.exe
in the log file.
2018-02-13 14:46:53.369 -- File entry --
2018-02-13 14:46:53.369 Dest filename: C:\Users\admin\Desktop\Iconysis Agent\AccessDatabaseEngine.exe
2018-02-13 14:46:53.369 Time stamp of our file: 2017-05-18 09:37:06.000
2018-02-13 14:46:53.370 Installing the file.
2018-02-13 14:46:55.579 Successfully installed the file.
2018-02-13 14:47:00.544 -- File entry --
2018-02-13 14:47:00.544 Dest filename: C:\Users\admin\Desktop\Iconysis Agent\AccessDatabaseEngine.exe
2018-02-13 14:47:00.544 Time stamp of our file: 2017-05-18 09:37:06.000
2018-02-13 14:47:00.544 Dest file exists.
2018-02-13 14:47:00.544 Time stamp of existing file: 2017-05-18 09:37:06.000
2018-02-13 14:47:00.544 Version of our file: 12.0.4518.1014
2018-02-13 14:47:00.637 Version of existing file: 12.0.4518.1014
2018-02-13 14:47:00.637 Same version. Skipping.
That most probably means that you have two entries for AccessDatabaseEngine.exe
in the [Files]
section.
I guess that you have one explicit entry for AccessDatabaseEngine.exe
and another wildcard entry what happens to match the same file. Something like:
[Files]
Source: "\\my_Directory\*"; DestDir: "{app}"
Source: "\\my_Directory\AccessDatabaseEngine.exe"; DestDir: "{app}"; \
Flags: deleteafterinstall;
The first entry installs AccessDatabaseEngine.exe
. And it does not have the deleteafterinstall
flag. The second entry does not install the file (as it's installed already), hence its deleteafterinstall
has no effect.
Upvotes: 1