I am learning how to use Inno Setup to create an installer for my project. I am having an issue though when it comes to updating. I've created the installer, and installed my application successfully. I've then updated my version number within the script and recompiled however when I run the installer it seems to treat it as a new install still.
For example, it will ask me where I want the application to be installed and when I click next then tells me the directory already exists. As the application has already been installed. I expected this bit to be skipped.
Below is my InnoSetup Script
; Script generated by the Inno Setup Script Wizard.
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!
#define MyAppName "SQLite Manager"
#define MyAppVersion "1.0.0.2"
#define MyAppPublisher "Boardies IT Solutions"
#define MyAppURL "http://www.boardiesitsolutions.com"
#define MyAppExeName "SqliteManager.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={{98A016AD-2DE2-4FF9-B639-0FDCA0BE41FD}
AppName={#MyAppName}
AppVersion={#MyAppVersion}
;AppVerName={#MyAppName} {#MyAppVersion}
AppPublisher={#MyAppPublisher}
AppPublisherURL={#MyAppURL}
AppSupportURL={#MyAppURL}
AppUpdatesURL={#MyAppURL}
DefaultDirName={pf}\Boardies IT Solutions\{#MyAppName}
DefaultGroupName=Boardies IT Solutions
LicenseFile=C:\Users\Chris\Documents\Visual Studio 2013\Projects\SqliteManager\SqliteManager\Terms.txt
OutputBaseFilename=sqliteman
SetupIconFile=C:\Users\Chris\Documents\Visual Studio 2013\Projects\SqliteManager\SqliteManager\Logo.ico
Compression=lzma
SolidCompression=yes
UsePreviousAppDir=yes
CreateUninstallRegKey=no
UpdateUninstallLogAppName=no
DisableDirPage=auto
[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: "C:\Users\Chris\Documents\Visual Studio 2013\Projects\SqliteManager\SqliteManager\bin\Debug\SqliteManager.exe"; DestDir: "{app}"; Flags: ignoreversion
Source: "C:\Users\Chris\Documents\Visual Studio 2013\Projects\SqliteManager\SqliteManager\bin\Debug\BoardiesITSolutions.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "C:\Users\Chris\Documents\Visual Studio 2013\Projects\SqliteManager\SqliteManager\bin\Debug\BoardiesITSolutions.INIReader.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "C:\Users\Chris\Documents\Visual Studio 2013\Projects\SqliteManager\SqliteManager\bin\Debug\changelog.xml"; DestDir: "{app}"; Flags: ignoreversion
Source: "C:\Users\Chris\Documents\Visual Studio 2013\Projects\SqliteManager\SqliteManager\bin\Debug\EntityFramework.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "C:\Users\Chris\Documents\Visual Studio 2013\Projects\SqliteManager\SqliteManager\bin\Debug\EntityFramework.SqlServer.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "C:\Users\Chris\Documents\Visual Studio 2013\Projects\SqliteManager\SqliteManager\bin\Debug\Middleware.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "C:\Users\Chris\Documents\Visual Studio 2013\Projects\SqliteManager\SqliteManager\bin\Debug\MySql.Data.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "C:\Users\Chris\Documents\Visual Studio 2013\Projects\SqliteManager\SqliteManager\bin\Debug\System.Data.SQLite.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "C:\Users\Chris\Documents\Visual Studio 2013\Projects\SqliteManager\SqliteManager\bin\Debug\System.Data.SQLite.EF6.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "C:\Users\Chris\Documents\Visual Studio 2013\Projects\SqliteManager\SqliteManager\bin\Debug\System.Data.SQLite.Linq.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "C:\Users\Chris\Documents\Visual Studio 2013\Projects\SqliteManager\SqliteManager\bin\Debug\WhatsNew.dll"; 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
Name: "{userappdata}\Microsoft\Internet Explorer\Quick Launch\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Tasks: quicklaunchicon
[Run]
Filename: "{app}\{#MyAppExeName}"; Description: "{cm:LaunchProgram,{#StringChange(MyAppName, '&', '&&')}}"; Flags: nowait postinstall skipifsilent
I've noticed that little detail
AppId={{98A016AD-2DE2-4FF9-B639-0FDCA0BE41FD}
Looks like you have a missing right curly brace.
Related
I seem to have a problem with compiling my games.
I usually compile my games and put it in a backup drive but there seems to be a problem. When I install the game, it seems like it won't work:
Is there anything wrong with the code?
#define MyAppName "The Binding of Isaac: Rebirth -ZteamDL-"
#define MyAppVersion "2.0"
#define MyAppPublisher "ZteamDL"
#define MyAppURL "google.com"
#define MyAppExeName "isaac.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={{75BE97EF-4424-46EC-B0C5-6E2F696A6AF3}
AppName={#MyAppName}
AppVersion={#MyAppVersion}
;AppVerName={#MyAppName} {#MyAppVersion}
AppPublisher={#MyAppPublisher}
AppPublisherURL={#MyAppURL}
AppSupportURL={#MyAppURL}
AppUpdatesURL={#MyAppURL}
DefaultDirName=C:\Program Files (x86)\ZteamDL\The Binding of Isaac Rebirth -ZteamDL-
DisableProgramGroupPage=yes
LicenseFile=C:\Users\alero\Desktop\Randoms\zteam.txt
; Remove the following line to run in administrative install mode (install for all users.)
PrivilegesRequired=lowest
PrivilegesRequiredOverridesAllowed=dialog
OutputDir=C:\Users\alero\Desktop\bi
OutputBaseFilename=The Binding of Isaac Rebirth -ZteamDL-
SetupIconFile=C:\Program Files (x86)\ZteamDL\The Binding of Isaac Rebirth\issacicon.ico
Password=ZteamDL
Compression=lzma
SolidCompression=yes
WizardStyle=modern
[Languages]
Name: "english"; MessagesFile: "compiler:Default.isl"
[Tasks]
Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked
[Files]
Source: "C:\Program Files (x86)\ZteamDL\The Binding of Isaac Rebirth\isaac.exe"; DestDir: "{app}"; Flags: ignoreversion
Source: "C:\Program Files (x86)\ZteamDL\The Binding of Isaac Rebirth\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs
; NOTE: Don't use "Flags: ignoreversion" on any shared system files
[Icons]
Name: "{autoprograms}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"
Name: "{autodesktop}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Tasks: desktopicon
[Run]
Filename: "{app}\{#MyAppExeName}"; Description: "{cm:LaunchProgram,{#StringChange(MyAppName, '&', '&&')}}"; Flags: nowait postinstall skipifsilent
The script is not correct:
Symbol {#MyAppName} is not defined.
When I define this symbol the script is working fine (ALL users mode, Create desktop shortcut is checked).
my application includes a db and users will be able to add data to the db via a GUI. So I need to give authorization to the user to modify the db. I tried all options from this post but authorization is still not allowed.
Here, this is an illustration of what I try to achieve (get Permissions for Modify checked in the "Allow" column):
Here my current code:
#define MyAppName "aaa"
#define MyAppVersion "1.0"
#define MyAppExeName "aaa.exe"
[Setup]
AppId={{...-...-...-...-...}
AppName={#MyAppName}
AppVersion={#MyAppVersion}
;AppVerName={#MyAppName} {#MyAppVersion}
DefaultDirName={pf}\{#MyAppName}
DisableProgramGroupPage=yes
OutputDir=C:\...\output
OutputBaseFilename=setup
Compression=lzma
SolidCompression=yes
[Languages]
Name: "english"; MessagesFile: "compiler:Default.isl"
[Tasks]
Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"; Flags: unchecked
[Dirs]
Name: "{app}\Logs"; Permissions: everyone-modify
[Files]
Source: "C:\...\aaa.exe"; DestDir: "{app}"; Flags: ignoreversion
Source: "C:\...\list_files\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs; Permissions: everyone-modify
; NOTE: Don't use "Flags: ignoreversion" on any shared system files
[Icons]
Name: "{commonprograms}\{#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
How can I give database access to the user through the creation process of the setup? Thank you
[Files]
Source: "C:\...\aaa.exe"; DestDir: "{app}"; Flags: ignoreversion
Source: "C:\...\folder_files\*"; DestDir: "{localappdata}\name_application\folder_files\"; Flags: ignoreversion recursesubdirs createallsubdirs
I'm a Korean. So English is poor.
I will use inno setup.
but There was a problem.
I want to do 'setup.exe compornet' I want to do first.
[Components]
Name: "sybase"; Description: "sybase"; Types: full
Name: "old_NIS"; Description: "old_NIS"; Types: full
Name: "new_NIS"; Description: "new_NIS"; Types: full
Name: "sybase_file"; Description: "sybase_file"; Types: full
[Files]
;sybase 프로그램
Source: "D:\a\setup.exe"; DestDir: "{app}"; Components: sybase
;신NIS
Source: "D:\b\*"; DestDir: "D:\b"; Flags: ignoreversion recursesubdirs createallsubdirs; Components: new_NIS
;구NIS
Source: "D:\c\*"; DestDir: "C:\c"; Flags: ignoreversion recursesubdirs createallsubdirs; Components: old_NIS
;***********sybase 설치후 작업단계*********************;
;sybase 설치후 32bit , 64bit 모두 설치.
Source: "D:\a\*"; DestDir: "C:\sybase"; Flags: ignoreversion recursesubdirs createallsubdirs; Components: sybase_file
;system 파일 32bit 64bit 구분설치
Source: "D:\a\*"; DestDir: "C:\Windows\System32"; Flags: ignoreversion recursesubdirs createallsubdirs; Check: not Is64BitInstallMode; Components: sybase_file
Source: "D:\a\*"; DestDir: "C:\Windows\SysWOW64"; Flags: ignoreversion recursesubdirs createallsubdirs; Check: Is64BitInstallMode; Components: sybase_file
;regsvr32 ezftp.ocx 처리하는것.
Source: ..\..\..\Windows\System32\EZFTP.OCX; DestDir: {app}; Flags: regserver; Components: sybase_file
Components are not run. Component is just a grouping for installation files/tasks/etc.
The files/tasks/etc are processed in the order in which they appear in the script.
So if you put files for "sybase" component first, they will be installed first. But you are actually doing that.
I need ignore some files (".sdf" and ".config") only when I'm doing a update on a installed application.
I'm getting the files recursively:
[Files]
Source: "..\..\bin\Release\MyApp.exe"; DestDir: "{app}"; Flags: ignoreversion
Source: "..\..\bin\Release\*"; DestDir: "{app}\"; Flags: ignoreversion recursesubdirs createallsubdirs; Permissions: everyone-full; Excludes: "*.key, *.udb, *.~db, *.crt"
Exist some way?
Thanks in advance.
Answer 1
Using onlyifdestfileexists and onlyifdoesntexist:
If the files don't exist (onlyifdoesntexist), copy all you want on first installation.
If the files exist (onlyifdestfileexists), add in Excludes those extensions that you don't want to update.
Source: "..\..\bin\Release\MyApp.exe"; DestDir: "{app}"; Flags: ignoreversion
Source: "..\..\bin\Release\*"; DestDir: "{app}"; Flags: ignoreversion onlyifdoesntexist recursesubdirs createallsubdirs; Permissions: everyone-full; Excludes: "*.key, *.udb, *.~db, *.crt"
Source: "..\..\bin\Release\*"; DestDir: "{app}"; Flags: ignoreversion onlyifdestfileexists recursesubdirs createallsubdirs; Excludes: "*.key, *.udb, *.~db, *.crt, *.sdf, *.config"
Answer 2 (It was not fully tested)
Using function to verify the existence of application folder.
[Files]
Source: "..\..\bin\Release\MyApp.exe"; DestDir: "{app}"; Flags: ignoreversion
Source: "..\..\bin\Release\*"; DestDir: "{app}\"; Flags: ignoreversion recursesubdirs createallsubdirs; Permissions: everyone-full; Excludes: "*.key, *.udb, *.~db, *.crt"; Check: not IsInstalled
Source: "..\..\bin\Release\*"; DestDir: "{app}\"; Flags: ignoreversion recursesubdirs createallsubdirs; Permissions: everyone-full; Excludes: "*.key, *.udb, *.~db, *.crt, *.sdf, *.config"; Check: IsInstalled
[code]
function IsInstalled: Boolean;
begin
if DirExists(ExpandConstant('{app}\')) then
begin
Result := True;
end else
Result := False;
end;
Add Check parameter in entry and make sure that check function returns false in update case. Below is the example can be referred.
[Files]
Source: "MYPROG.EXE"; DestDir: "{app}"; Check: MyProgCheck
http://www.jrsoftware.org/ishelp/index.php?topic=scriptcheck
Hej guys!
I am trying to make a installer for my application with innosetup, everything goes finde, just a little problem:
It does not create the directorys i put in
Source: "C:\Users\Etix\Desktop\Fower\data\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs
Source: "C:\Users\Etix\Desktop\Fower\Media\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs
It just puts all files of the directorys in the application folder but does not create the directorys and put the files into them.
Do you know how to make it realy CREATE the folder and put the files into him?
Here my whole code:
; Script generated by the Inno Setup Script Wizard.
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!
#define MyAppName "Fower"
#define MyAppVersion "1.0"
#define MyAppPublisher "FoxFire Development"
#define MyAppURL "http://www.foxfiredev.net"
#define MyAppExeName "Fower.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={{1D8512EB-BA40-41B9-8E38-262D637508B9}
AppName={#MyAppName}
AppVersion={#MyAppVersion}
;AppVerName={#MyAppName} {#MyAppVersion}
AppPublisher={#MyAppPublisher}
AppPublisherURL={#MyAppURL}
AppSupportURL={#MyAppURL}
AppUpdatesURL={#MyAppURL}
DefaultDirName={pf}\{#MyAppName}
DefaultGroupName={#MyAppName}
OutputDir=C:\Users\Etix\Desktop\FowerSetup
OutputBaseFilename=FowerSetup
SetupIconFile=C:\Users\Etix\Desktop\FoxFireDev\Projekt - Fower\ManagementNeu\Release\icon.ico
Compression=lzma
SolidCompression=yes
[Languages]
Name: "german"; MessagesFile: "compiler:Languages\German.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: "C:\Users\Etix\Desktop\Fower\Fower.exe"; DestDir: "{app}"; Flags: ignoreversion
Source: "C:\Users\Etix\Desktop\Fower\data\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs
Source: "C:\Users\Etix\Desktop\Fower\Media\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs
Source: "C:\Users\Etix\Desktop\Fower\icon.png"; DestDir: "{app}"; Flags: ignoreversion
Source: "C:\Users\Etix\Desktop\Fower\libsndfile-1.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "C:\Users\Etix\Desktop\Fower\msvcp110.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "C:\Users\Etix\Desktop\Fower\msvcr110.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "C:\Users\Etix\Desktop\Fower\openal32.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "C:\Users\Etix\Desktop\Fower\sansation.ttf"; DestDir: "{app}"; Flags: ignoreversion
Source: "C:\Users\Etix\Desktop\Fower\sfgui wqeq.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "C:\Users\Etix\Desktop\Fower\sfgui.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "C:\Users\Etix\Desktop\Fower\sfml-audio-2.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "C:\Users\Etix\Desktop\Fower\sfml-graphics-2.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "C:\Users\Etix\Desktop\Fower\sfml-network-2.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "C:\Users\Etix\Desktop\Fower\sfml-system-2.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "C:\Users\Etix\Desktop\Fower\sfml-window-2.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "C:\Users\Etix\Desktop\Fower\tgui.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "C:\Users\Etix\Desktop\Fower\thor.dll"; DestDir: "{app}"; Flags: ignoreversion
; NOTE: Don't use "Flags: ignoreversion" on any shared system files
[Icons]
Name: "{group}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"
Name: "{group}\{cm:ProgramOnTheWeb,{#MyAppName}}"; Filename: "{#MyAppURL}"
Name: "{group}\{cm:UninstallProgram,{#MyAppName}}"; Filename: "{uninstallexe}"
Name: "{commondesktop}\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Tasks: desktopicon
Name: "{userappdata}\Microsoft\Internet Explorer\Quick Launch\{#MyAppName}"; Filename: "{app}\{#MyAppExeName}"; Tasks: quicklaunchicon
[Run]
Filename: "{app}\{#MyAppExeName}"; Description: "{cm:LaunchProgram,{#StringChange(MyAppName, '&', '&&')}}"; Flags: nowait postinstall skipifsilent
you can change the code as follows to copy the contents seperately in respective folders ,
Source: "C:\Users\Etix\Desktop\Fower\data\*"; DestDir: "{app}\data"; Flags: ignoreversion recursesubdirs createallsubdirs
Source: "C:\Users\Etix\Desktop\Fower\Media\*"; DestDir: "{app}\Media"; Flags: ignoreversion recursesubdirs createallsubdirs
What about using the [Dirs] section to get {app}\data and {app}\Media created first?