Let me know you my purpose first. I have some dynamic link libraries being used by the application. For client requirement, I need to copy them to the System32 directory of windows. But I am facing some problem to do this.
I have already checked this link before. But I couldn't understand I will modify my script to call a function which copies files after installation. i.e. when, where and how to call a function like this.
Her is My Script
#define MyAppName "ABC ToolS"
#define MyAppVersion "1.0"
#define MyAppPublisher "ABC Lab Ltd."
#define MyAppURL "ABC.com"
#define MyAppExeName "MyProg.exe"
[Setup]
; NOTE: The value of AppId uniquely identifies this application.
; Do not use the same AppId value in installers for other applications.
; (To generate a new GUID, click Tools | Generate GUID inside the IDE.)
AppId={{399B836A-28F5-4741-A54F-09658DE3E407}
AppName={#MyAppName}
AppVersion={#MyAppVersion}
;AppVerName={#MyAppName} {#MyAppVersion}
AppPublisher={#MyAppPublisher}
AppPublisherURL={#MyAppURL}
AppSupportURL={#MyAppURL}
AppUpdatesURL={#MyAppURL}
DefaultDirName={pf}\{#MyAppName}
DefaultGroupName={#MyAppName}
OutputDir=C:\Users\user06\Desktop
OutputBaseFilename=A
SetupIconFile=C:\Users\user06\Desktop\Release\logo.ico
Compression=lzma
SolidCompression=yes
[Languages]
Name: "english"; MessagesFile: "compiler:Default.isl"
[Tasks]
Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked
[Files]
Source: "C:\Program Files\Inno Setup 5\Examples\MyProg.exe"; DestDir: "{app}"; Flags: ignoreversion
Source: "C:\Users\user06\Desktop\Release\A.exe"; DestDir: "{app}"; Flags: ignoreversion
Source: "C:\Users\user06\Desktop\Release\lib\A.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "C:\Users\user06\Desktop\Release\B.dll"; DestDir: "{app}"; Flags: ignoreversion
; NOTE: Don't use "Flags: ignoreversion" on any shared system files
; ADDED AS AN EXAMPLE
;If the DLL should be copied to System32 (on both 32 and 64 bit Windows versions)
Source: "C:\Users\user06\Desktop\Release\lib\A.dll"; DestDir: "{sys}"; Flags: sharedfile
;If the DLL should be copied to System32 on 32 bit Windows and to SysWOW64 on 64 bit Windows - Do not use this constant unless you have a specific need to obtain the name of the actual directory in which 32-bit system files reside. Gratuitously using {syswow64} in places where {sys} will suffice may cause problems.
Source: "C:\Users\user06\Desktop\Release\lib\A.dll"; DestDir: "{syswow64}"; Flags: sharedfile
[Icons]
Name: "{group}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"
Name: "{commondesktop}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Tasks: desktopicon
[Run]
Filename: "{app}\{#MyAppExeName}"; Description: "{cm:LaunchProgram,{#StringChange(MyAppName, '&', '&&')}}"; Flags: nowait postinstall skipifsilent
;[PostIn]
Please help me to modify my script so that I can copy files after installation. Furthermore, I need to delete them also when the program is being uninstalled. But I couldn't find any uninstaller script. Is that anyone?