Question: I’d like to know how to script to download a second file which is a zip but initially give a choice between two zip files; download, unzip and delete the zip. The zip files each have different names but the contents have a different name to the zips (each the same name); no renaming required. This question is a little similar to Apply Download file condition in inno-setup
The files in question are downloaded via the SourceForge website. The programs (clones) these files are intended for are either not listed on SF or have changed purpose.
After fixing the PChar bug: InnoTools Downloader not working with Inno 5.5 I'm now able to re-use this Inno Setup script from 2011 but want to expand it slightly but struggling to.
#include ReadReg(HKEY_LOCAL_MACHINE,'Software\Sherlock Software\InnoTools\Downloader','ScriptPath','');
[Code]
procedure InitializeWizard();
begin
itd_init;
{ Set download source.. }
itd_addfile('http://www.example.com/Textfile.txt', ExpandConstant('{tmp}\Textfile.txt'));
itd_setoption('UI_AllowContinue','1');
itd_setoption('UI_DetailedMode','1');
{ Start the download after the "Ready to install" screen is shown }
itd_downloadafter(wpReady);
end;
procedure CurStepChanged(CurStep: TSetupStep);
begin
if CurStep = ssInstall then { Lets install the downloaded files }
begin
FileCopy(ExpandConstant('{tmp}\Textfile.txt'), ExpandConstant('{userappdata}\program_name\Textfile.txt'), false);
end;
end;
Working code based on the answer:
#pragma include __INCLUDE__ + ";" + "c:\lib\InnoDownloadPlugin"
[Setup]
...
CreateUninstallRegKey=no
#include <idp.iss>
...
[Types]
Name: full; Description: "Full installation"
Name: compact; Description: "Compact installation"
Name: custom; Description: "Custom installation"; Flags: iscustom
[Components]
Name: abc; Description: "C File"; Types: full compact custom; Flags: fixed
Name: hlnj; Description: "HL (Recommended)"; Types: custom; Flags: exclusive
Name: hnj; Description: "HF"; Types: custom; Flags: exclusive
[Files]
Source: "{tmp}\text.net"; DestDir: "{userappdata}\ccc"; Flags: external; Components: abc
Source: "{tmp}\HLNJ.zip"; DestDir: "{userappdata}\ccc"; Flags: external; Components: hlnj
Source: "{tmp}\HNJ.zip"; DestDir: "{userappdata}\ccc"; Flags: external; Components: hnj
[Code]
procedure InitializeWizard;
begin
idpAddFileComp('http://www.example.com/text.net', ExpandConstant('{tmp}\text.net'), 'abc');
idpAddFileComp('http://www.example.com/SecurityUpdates/HLNJ.zip', ExpandConstant('{tmp}\HLNJ.zip'), 'hlnj');
idpAddFileComp('http://www.example.com/SecurityUpdates/HNJ.zip', ExpandConstant('{tmp}\HNJ.zip'), 'hnj');
idpDownloadAfter(wpReady);
end;
procedure CurStepChanged(CurStep: TSetupStep);
begin
if CurStep = ssPostInstall then
begin
FileCopy(ExpandConstant('{tmp}\text.net'), ExpandConstant('{userappdata}\ccc\text.net'), false);
FileCopy(ExpandConstant('{tmp}\HLNJ.zip'), ExpandConstant('{userappdata}\ccc\HLNJ.txt'), false);
FileCopy(ExpandConstant('{tmp}\HNJ.zip'), ExpandConstant('{userappdata}\ccc\HNJ.txt'), false);
end;
end;
Only after posting my answer, I've noticed that despite you tagging the question inno-download-plugin, you are actually using InnoTools Downloader. Do not – InnoTools Downloader is dead and unmaintained.
Also note that the Inno Setup 6.1 has a built-in support for downloads. With that API, the solution will be easier, but different than what is shown below to IDP. See Inno Setup: Install file from Internet.
In the examples folder of Inno Download Plugin installation, there are components1.iss and components2.iss examples.
The first shows how to use idpAddFileComp to conditionally download a file, when a component is selected.
I'm re-posting a full example:
; Uncomment one of following lines, if you haven't checked "Add IDP include path to ISPPBuiltins.iss" option during IDP installation:
;#pragma include __INCLUDE__ + ";" + ReadReg(HKLM, "Software\Mitrich Software\Inno Download Plugin", "InstallDir")
;#pragma include __INCLUDE__ + ";" + "c:\lib\InnoDownloadPlugin"
[Setup]
AppName = My Program
AppVersion = 1.0
DefaultDirName = {pf}\My Program
DefaultGroupName = My Program
OutputDir = userdocs:Inno Setup Examples Output
#include <idp.iss>
[Types]
Name: full; Description: "Full installation"
Name: compact; Description: "Compact installation"
Name: custom; Description: "Custom installation"; Flags: iscustom
[Components]
Name: app; Description: "My Program"; Types: full compact custom; Flags: fixed
Name: help; Description: "Help files"; Types: full
Name: src; Description: "Source code"; Types: full
[Files]
Source: "{tmp}\app.exe"; DestDir: "{app}"; Flags: external; ExternalSize: 1048576; Components: app
Source: "{tmp}\help.chm"; DestDir: "{app}"; Flags: external; ExternalSize: 1048576; Components: help
Source: "{tmp}\src.zip"; DestDir: "{app}"; Flags: external; ExternalSize: 1048576; Components: src
[Icons]
Name: "{group}\My Program"; Filename: "app.exe"; Components: app
Name: "{group}\Help file"; Filename: "help.chm"; Components: help
Name: "{group}\{cm:UninstallProgram,My Program}"; Filename: "{uninstallexe}"
[Code]
procedure InitializeWizard;
begin
idpAddFileComp('http://127.0.0.1/app.exe', ExpandConstant('{tmp}\app.exe'), 'app');
idpAddFileComp('http://127.0.0.1/help.chm', ExpandConstant('{tmp}\help.chm'), 'help');
idpAddFileComp('http://127.0.0.1/src.zip', ExpandConstant('{tmp}\src.zip'), 'src');
idpDownloadAfter(wpReady);
end;
Caveat: The component name passed to idpAddFileComp must be in lowercase (the actual component name can use uppercase).
Inno Setup 6.1.2 has new DownloadTemporaryFile support function to download files without using a third-party tool:
Supports HTTPS (but not expired or self-signed certificates) and HTTP.
Redirects are automatically followed and proxy settings are automatically used.
Safe to use from services unlike existing third-party tools.
Supports SHA-256 hash checking of the downloaded file.
Supports basic authentication.
I added this answer because even the IDP plugin referred in the accepted answer was last updated in 2016 and did not work for me now and I had to change to the new function provided by Inno Setup 6.1.2.
Related
I want to create an user-friendly setup installer for my application.
Actually it's very basic:
[Setup]
AppName=My Application
AppVersion=2.5
DefaultDirName={pf}\MyApplication
DisableProgramGroupPage=yes
UninstallDisplayIcon={app}\MyApp.exe
OutputDir=userdocs:MyApp
SetupIconFile=icon.ico
UninstallIconFile=icon.ico
[Components]
Name: "program"; Description: "Program Files"; Types: full compact custom; Flags: fixed
Name: "driver"; Description: "Driver files"; Types: full
Name: "driver\USB"; Description: "USB-Driver"; Types: full; Flags: checkablealone
Name: "driver\MISC"; Description: "MISC-Driver"; Types: full ;Flags: checkablealone
[Files]
Source: "*.exe"; DestDir: "{app}"; Components: program
Source: "*.dll"; DestDir: "{app}"; Components: program
Source: "*.bmp"; DestDir: "{app}"; Components: program
Source: "*.ini"; DestDir: "{app}"; Components: program
Source: "USBDriver.exe"; DestDir: "{app}"; Components: driver\usb
Source: "MiscDriver.exe"; DestDir: "{app}"; Components: driver\misc
[Run]
Filename: "{app}\USBDriver.exe"; Description: "Install USB-Driver"; Flags: postinstall skipifdoesntexist
Filename: "{app}\MiscDriver.exe"; Description: "Install Misc-Driver"; Flags: postinstall skipifdoesntexist runascurrentuser
[Icons]
Name: "{commonprograms}\MyApp"; Filename: "{app}\MyApp.exe"
Name: "{commondesktop}\MyApp"; Filename: "{app}\MyApp.exe"
The user should decide if he wants to install the both drivers.
For that I created the two [Run] section entries.
After the installation, the driver installation should start.
Actually it's buggy there. I got a problem if I checked no driver installation component, or just one of them. Nevertheless the installer still runs both setup files I got to choose after installation.
How could I start the driver installation only if the user checked its component for installation?
Thanks in advance
You have to filter the [Run] section entries using the Components parameter, the same way you filter the entries in the [Files] section already:
[Run]
Filename: "{app}\USBDriver.exe"; Description: "Install USB-Driver"; \
Components: driver\usb; Flags: postinstall
Filename: "{app}\MiscDriver.exe"; Description: "Install Misc-Driver"; \
Components: driver\misc; Flags: postinstall runascurrentuser
Note that I've removed the skipifdoesntexist flag as I suppose it was your attempt to solve the problem. In general you should not use it, as its only effect is:
If this flag is specified in the [Run] section, Setup won't display an error message if Filename doesn't exist.
If you want to run the installers always, when they are installed, just remove the postinstall flag and replace the Description parameter with the StatusMsg parameter.
You also probably do not want to copy the installers to the {app} at all. Install them to the {tmp} and use the deleteafterinstall flag to have the main installer remove them after the installation.
[Files]
Source: "USBDriver.exe"; DestDir: "{tmp}"; Components: driver\usb; Flags: deleteafterinstall
Source: "MiscDriver.exe"; DestDir: "{tmp}"; Components: driver\misc; Flags: deleteafterinstall
[Run]
Filename: "{tmp}\USBDriver.exe"; StatusMsg: "Installing USB-Driver"; \
Components: driver\usb; Flags: runasoriginaluser
Filename: "{tmp}\MiscDriver.exe"; StatusMsg: "Installing Misc-Driver"; \
Components: driver\misc
(Without the postinstall flag, the default is the runascurrentuser, hence I switched the flags).
I have a Visual Studio program that I made an installer for using Inno Setup. I then had a few errors when trying to open the application such as missing .dll's which I added to the project directory. I then got an error like "procedure entry point could not be located in the dynamic link library PvBuffer.dll" which I fixed by adding PvBuffer.dll to the project directory.
Now when I make the installer and try to run the installed application, nothing happens. I click on the application and the program simply crashes. No errors, nothing. The release .exe file works fine in the project but the installed application doesn't. Any suggestions of what might be causing this? Thanks
Edit 1: Slappy here is my installer script:
[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={{AFC14F65-6DD7-479B-AA27-C15F14763641}
AppName=FLIR615
AppVersion=1.5
;AppVerName=FLIR615 1.5
AppPublisher=My Company, Inc.
AppPublisherURL=http://www.example.com/
AppSupportURL=http://www.example.com/
AppUpdatesURL=http://www.example.com/
DefaultDirName={pf}\FLIR615
DefaultGroupName=FLIR615
AllowNoIcons=yes
OutputBaseFilename=setup
Compression=lzma
SolidCompression=yes
[Languages]
Name: "english"; MessagesFile: "compiler:Default.isl"
[Tasks]
Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked
Name: "quicklaunchicon"; Description: "{cm:CreateQuickLaunchIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked; OnlyBelowVersion: 0,6.1
[Files]
Source: "D:\FLIR Project\FLIR Project\GEVPlayerSample\SampleRelease\GEVPlayerSample.exe"; DestDir: "{app}"; Flags: ignoreversion
Source: "D:\FLIR Project\FLIR Project\GEVPlayerSample\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs
; NOTE: Don't use "Flags: ignoreversion" on any shared system files
[Icons]
Name: "{group}\FLIR615"; Filename: "{app}\GEVPlayerSample.exe"
Name: "{group}\{cm:ProgramOnTheWeb,FLIR615}"; Filename: "http://www.example.com/"
Name: "{group}\{cm:UninstallProgram,FLIR615}"; Filename: "{uninstallexe}"
Name: "{commondesktop}\FLIR615"; Filename: "{app}\GEVPlayerSample.exe"; Tasks: desktopicon
Name: "{userappdata}\Microsoft\Internet Explorer\Quick Launch\FLIR615"; Filename: "{app}\GEVPlayerSample.exe"; Tasks: quicklaunchicon
[Run]
Filename: "{app}\GEVPlayerSample.exe"; Description: "{cm:LaunchProgram,FLIR615}"; Flags: nowait postinstall skipifsilent
Edit 2 KirbyFan64SOS Here is what the errors are in dependency walker:
Edit 3 After monitoring the crash in event viewer I noticed some errors which I have posted below
The errors that are the linked to the program that crashed seem to relate to KERNALBASE.dll. Does anyone know what this means?
I had the same issue and the cause for it is not having dll. Right dll (along with 32/64 bit) and exact version is very important.
I want to store my app in the current user's AppData directory to avoid problems with permissions we had when auto-updating our app (when it's stored in Program Files). We don't give the user the option of where to install the app. We've had complaints from non-admin users that the installer stores the app in the admin's AppData directory (after UAC of course), instead of the current user's AppData directory, which then prevents the app from running in the future.
Firstly, I had DefaultDirName={userappdata}\{#MyAppName}. Then I tried DefaultDirName={commonappdata}\{#MyAppName}. Then I tried that along with PrivilegesRequired=lowest and even as PrivilegesRequired=none as the Make InnoSetup installer request privileges elevation only when needed question suggested.
This is my script as of right now in case I'm missing something obvious:
; Script generated by the Inno Setup Script Wizard.
;SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!
#define MyAppName "Teamwork Chat"
#define MyAppVersion "0.10.0"
#define MyAppPublisher "Digital Crew, Ltd."
#define MyAppURL "http://www.teamwork.com/"
#define MyAppExeName "TeamworkChat.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={{0F063485-F5AF-4ADE-A9F9-661AB3BAA661}
AppName={#MyAppName}
AppVersion={#MyAppVersion}
;AppVerName={#MyAppName} {#MyAppVersion}
AppPublisher={#MyAppPublisher}
AppPublisherURL={#MyAppURL}
AppSupportURL={#MyAppURL}
AppUpdatesURL={#MyAppURL}
DefaultDirName={userappdata}\{#MyAppName}
DisableDirPage=yes
DefaultGroupName={#MyAppName}
OutputDir=E:\chat-client\dist
OutputBaseFilename={#MyAppName}_for_Windows32_Installer-{#MyAppVersion}
SetupIconFile=E:\chat-client\icons\teamwork_chat.ico
WizardImageFile=E:\chat-client\icons\chatWizardImageFile.bmp
Compression=lzma
SolidCompression=yes
PrivilegesRequired=none
[Languages]
Name: "english"; MessagesFile: "compiler:Default.isl"
[Tasks]
Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked
[Files]
Source: "E:\chat-client\dist\TeamworkChat\win32\TeamworkChat.exe"; DestDir: "{app}"; Flags: ignoreversion
Source: "E:\chat-client\dist\TeamworkChat\win32\ffmpegsumo.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "E:\chat-client\dist\TeamworkChat\win32\icudtl.dat"; DestDir: "{app}"; Flags: ignoreversion
Source: "E:\chat-client\dist\TeamworkChat\win32\libEGL.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "E:\chat-client\dist\TeamworkChat\win32\libGLESv2.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "E:\chat-client\dist\TeamworkChat\win32\nw.pak"; DestDir: "{app}"; Flags: ignoreversion
; NOTE: Don't use "Flags: ignoreversion" on any shared system files
[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
Edit
I've changed two options but still no luck;
PrivilegesRequired=lowest
...
[Icons]
...
Name: "{userdesktop}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Tasks: desktopicon
Edit 2:
I've added the runasoriginaluser flag and generated a new AppId (GUID) but still no luck;
[Run]
Filename: "{app}\{#MyAppExeName}"; Description: "{cm:LaunchProgram,{#StringChange(MyAppName, '&', '&&')}}"; Flags: nowait postinstall skipifsilent runasoriginaluser
Edit 3:
I've created a simple GitHub repository with the source files and Inno script.
Edit 4:
I had been testing on Windows 8.1. It seems to work when compiled on Windows 7, and ran on Windows 8, but not when compiled on 8 and ran on 8.
Edit 5:
It's solved now but to clear things up regarding Edit 4, it wasn't working only on my machine. It worked on other Windows 8 machines. Must've been some weird caching or something (even though I changed the AppId).
From the wording of your question and if I am understanding you correctly, it sounds like this is because you are "validating with an admin account for the install to run." If this is the case and you are entering a different account (from that which you are logged in with) at the UAC prompt, the current user then actually becomes the Administrator account you just entered at the UAC prompt and not the account you are logged in with. Therefore, as long as you are being asked to elevate the installation using UAC, it will not end up in the logged in user's AppData directory.
What you may need to do is use the runasoriginaluser function, which will use the logged in user credentials instead of the account you entered at the UAC prompt, or find what is causing the UAC elevation prompt.
See also Inno Setup Creating registry key for logged in user (not admin user).
The MSDN documentation on Installation Context may also be useful.
It should work with PrivilegesRequired=lowest. And it's the correct approach. If it does not, we want to see a log file.
The lowest will make the installer run within context of the current unprivileged user. Hence all constants, like {userappdata}, {userdesktop}, etc, will refer to the current user.
Anyway, to answer your question, you can use the code below.
But that's just for special situations, when the installer really needs administrator privileges (e.g. to register some system DLL), but still needs to deploy files for the original user. Like here: Inno Setup - Register components as an administrator.
[Files]
Source: "MyProg.exe"; DestDir: "{code:GetAppData}"
[Code]
var
AppDataPath: string;
function GetAppData(Param: string): string;
begin
Result := AppDataPath;
end;
function InitializeSetup(): Boolean;
var
Uniq: string;
TempFileName: string;
Cmd: string;
Params: string;
ResultCode: Integer;
Buf: AnsiString;
begin
AppDataPath := ExpandConstant('{userappdata}');
Log(Format('Default/Fallback application data path is %s', [AppDataPath]));
Uniq := ExtractFileName(ExpandConstant('{tmp}'));
TempFileName :=
ExpandConstant(Format('{commondocs}\appdata-%s.txt', [Uniq]));
Params := Format('/C echo %%APPDATA%% > %s', [TempFileName]);
Log(Format('Resolving APPDATA using %s', [Params]));
Cmd := ExpandConstant('{cmd}');
if ExecAsOriginalUser(Cmd, Params, '', SW_HIDE, ewWaitUntilTerminated, ResultCode) and
(ResultCode = 0) then
begin
if LoadStringFromFile(TempFileName, Buf) then
begin
AppDataPath := Trim(Buf);
Log(Format('APPDATA resolved to %s', [AppDataPath]));
end
else
begin
Log(Format('Error reading %s', [TempFileName]));
end;
DeleteFile(TempFileName);
end
else
begin
Log(Format('Error %d resolving APPDATA', [ResultCode]));
end;
Result := True;
end;
More similar questions:
Inno Setup Using {localappdata} for logged in user
Inno Setup - puts user files in admin documents
I need help with Inno Setup. First of all I want to sorry about my english. I hope you understand me.
I have this script:
; Script generated by the Inno Setup Script Wizard.
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!
#define MyAppName "My software - BETA"
#define MyAppVersion "1.5"
#define MyAppExeName "My software.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={{009E8058-565E-43F7-BEAD-34E283BCA6F4}
AppName={#MyAppName}
AppVersion={#MyAppVersion}
;AppVerName={#MyAppName} {#MyAppVersion}
DefaultDirName={pf}\{#MyAppName}
DefaultGroupName={#MyAppName}
LicenseFile=D:\My software\EULA.rtf
OutputBaseFilename=My software - Setup
Compression=lzma
SolidCompression=yes
[Languages]
Name: "english"; MessagesFile: "compiler:Default.isl"
[Tasks]
Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked
[Files]
Source: "D:\My software\My software.exe"; DestDir: "{app}"; Flags: ignoreversion
Source: "D:\My software\settings.txt"; DestDir: "{userappdata}\My software"; Flags: ignoreversion
; NOTE: Don't use "Flags: ignoreversion" on any shared system files
[Icons]
Name: "{group}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"
Name: "{group}\{cm:UninstallProgram,{#MyAppName}}"; Filename: "{uninstallexe}"
Name: "{commondesktop}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Tasks: desktopicon
[Run]
Filename: "{app}\{#MyAppExeName}"; Description: "{cm:LaunchProgram,{#StringChange(MyAppName, '&', '&&')}}"; Flags: nowait postinstall skipifsilent
The setup works but I want to add several options to the setup:
1) If the software is already installed then I want that will be an option that give the usere the ability to choose whether to overwrite the previous settings..
something like checkbox: "Don't overwrite the previous settings"
and in by default the setup will not overwrite the previous settings.
2) In the uninstaller I want the option: "Remove also the settings" (something like that) and by default this option is unchecked
3) I want that the option "Create a desktop icon" will always be checked by default.
I noticed that this option is checked by default only if the icon is already created before.
Thanks for helpers!
Gil.
Answers for your question:
1-If you are installing a application which is already install it should give user uninstalling
option.To keep Previous setting you can use Flags: onlyifdoesntexist for [Files], or
Flags: createvalueifdoesntexist for [Registry].
2-Put the following code in [Code] section,it should give user to removeing setting option.
[Code]
procedure CurUninstallStepChanged (CurUninstallStep: TUninstallStep);
var
mres : integer;
begin
case CurUninstallStep of
usPostUninstall:
begin
mres := MsgBox('Do you want to Remove Settings?', mbConfirmation, MB_YESNO or MB_DEFBUTTON2)
if mres = IDYES then
DelTree(ExpandConstant('{userdocs}\Myapp'), True, True, True);
end;
end;
end;
3-If you want the icon task Will be checked then remove the Flags: unchecked part from [Task] section.
After an installation has completed, the installer gives the user a check box option labeled "View" that gives the user the option to apparently open the installation folder upon completion of the install. How do I disable this?
Once the install completes, I don't want the user to have the option to "View" anything. Just close the installer.
UPDATE: here is the script:
; Script generated by the Inno Setup Script Wizard.
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!
#define MyAppName "My App"
#define MyAppVersion "1.0"
#define MyAppPublisher "Blah, LLC"
#define MyAppURL "http://www.blah.com/"
[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={{f47ac10b-58cc-4372-a567-0e02b2c3d479}
AppName={#MyAppName}
AppVersion={#MyAppVersion}
;AppVerName={#MyAppName} {#MyAppVersion}
AppPublisher={#MyAppPublisher}
AppPublisherURL={#MyAppURL}
AppSupportURL={#MyAppURL}
AppUpdatesURL={#MyAppURL}
CreateAppDir=false
LicenseFile=Release\EULA.rtf
SetupIconFile=Release\bin\logo.ico
Compression=lzma/Max
SolidCompression=true
AppCopyright=Blah, LLC
AppVerName={#MyAppName}
DisableFinishedPage=yes
VersionInfoVersion=1.0
VersionInfoCompany=Blah, LLC
VersionInfoDescription=My description here.
VersionInfoCopyright=2012
VersionInfoProductName=My App
VersionInfoProductVersion=1.0
[Languages]
Name: "english"; MessagesFile: "compiler:Default.isl"
[Files]
Source: Release\bin\glassfish-3.1.2; DestDir: {sd}\MyApp; Flags: ignoreversion recursesubdirs createallsubdirs external;
; NOTE: Don't use "Flags: ignoreversion" on any shared system files
Source: {src}\README.txt; DestDir: {tmp}; Attribs: ReadOnly; Flags: isreadme external dontcopy;
[Types]
Name: full; Description: "Full Installation";
Name: custom; Description: "Custom Installation"; Flags: IsCustom;
[Components]
Name: webserver; Description: "GlassFish 3.1.2 Application Server"; Types: full custom; ExtraDiskSpaceRequired: 100851712;
Name: sqlserver; Description: "SQL Server Express 2008 R2"; ExtraDiskSpaceRequired: 745537536; Types: full custom;
Name: sqlserver\sqlserver_x64; Description: "Microsoft SQL Server Express (x64)"; Flags: exclusive; Types: full custom;
Name: sqlserver\sqlserver_x86; Description: "Microsoft SQL Server Express (x86)"; Flags: exclusive; Types: full custom;
[Tasks]
Components: webserver; Name: glassfishservice; Description: "Register the web server as a Windows Service."; GroupDescription: "Web Server Options";
[Run]
Tasks: glassfishservice; Components: webserver; Filename: asadmin; Parameters: "create-service MyApp"; WorkingDir: "{sd}\MyApp\bin"; StatusMsg: "Creating GlassFish service.";
Tasks: glassfishservice; Components: webserver; Filename: net; Parameters: "start ""MyApp GlassFish Server"""; StatusMsg: "Starting Windows service.";
; https://blogs.oracle.com/foo/entry/automatic_starting_of_servers_in AND https://blogs.oracle.com/foo/entry/how_to_make_v3_platform
Filename: SQLEXPRWT_x86_ENU.exe; WorkingDir: {src}\bin; Description: "Installs SQL Server 32-bit edition."; StatusMsg: "Installing SQL Server Express 2008..."; Components: sqlserver\sqlserver_x86; Flags: HideWizard 32bit;
Filename: SQLEXPRWT_x64_ENU.exe; WorkingDir: {src}\bin; Description: "Installs SQL Server 64-bit edition."; StatusMsg: "Installing SQL Server Express 2008..."; Components: sqlserver\sqlserver_x64; Flags: HideWizard 64bit;
Components: "sqlserver sqlserver\sqlserver_x64 sqlserver\sqlserver_x86"; Filename: sqlcmd; Parameters: "-S COMPUTER\SQLEXPRESS -i {sd}\bin\script.sql"; Description: "Creating database.";
[InnoIDE_PostCompile]
Name: "C:\Program Files\PowerISO\piso.exe"; Parameters: "create -o """"{#MyAppName} - v{#MyAppVersion}.iso"""" -add Release /"; Flags: CmdPrompt;
[UninstallRun]
Tasks: glassfishservice; Components: webserver; Filename: net; Parameters: "stop ""MyApp GlassFish Server"""; StatusMsg: "Stopping Windows service.";
Tasks: glassfishservice; Components: webserver; Filename: asadmin; Parameters: "_delete-service MyApp"; WorkingDir: "{sd}\MyApp\bin"; StatusMsg: "Destroying GlassFish service.";
[Dirs]
If this is an InnoSetup install, check your [Run] section for a postinstall entry and remove it.
The postinstall is defined in the docs as:
postinstall
Valid only in a [Run] section. Instructs Setup to create a checkbox on the Setup Completed wizard page. The user can uncheck or
check this checkbox and thereby choose whether this entry should be
processed or not. Previously this flag was called showcheckbox.
Another cause of a check box on the Finished page is the isreadme flag. From the docs:
isreadme
File is the "README" file. Only one file in an installation can have
this flag. When a file has this flag, the user will asked if he/she
would like to view the README file after the installation has
completed. If Yes is chosen, Setup will open the file, using the
default program for the file type. For this reason, the README file
should always end with an extension like .txt, .wri, or .doc.
Note that if Setup has to restart the user's computer (as a result of
installing a file with the flag restartreplace or if the AlwaysRestart
[Setup] section directive is yes), the user will not be given an
option to view the README file