Innosetup - components

I choose the type of installation, server or client.
if you install a server must start the MySQL installation, but such is not a client.
[Types]
Name: "Server"; Description: "Installazione Server"
Name: "Client"; Description: "Installazione Client"

[Components]
Name: "program"; Description: "Program Files"; Types: Server; Flags: fixed
Name: "program"; Description: "Program Files"; Types: Client

[Run]
Filename: "{app}\Installation\mysql.exe";

Open in new window

danz67Asked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

mirtheilSoftware DeveloperCommented:
Using your code as an example:

2:
3:
4:
5:
6:
7:
8:
9:
10:

	

[Types]
Name: "Server"; Description: "Installazione Server"
Name: "Client"; Description: "Installazione Client"

[Components]
Name: "program"; Description: "Program Files"; Types: Server; Flags: fixed
Name: "program"; Description: "Program Files"; Types: Client

[Run]
Filename: "{app}\Installation\mysql.exe"; Components: program;

Open in new window

0
mirtheilSoftware DeveloperCommented:
Sorry, I missed that you have the same component name twice.  You should probably change it to something like:

2:
3:
4:
5:
6:
7:
8:
9:
10:

	

[Types]
Name: "Server"; Description: "Installazione Server"
Name: "Client"; Description: "Installazione Client"

[Components]
Name: "program"; Description: "Program Files"; Types: Server; Flags: fixed
Name: "client"; Description: "Program Files"; Types: Client

[Run]
Filename: "{app}\Installation\mysql.exe"; Components: program;

Open in new window

0
danz67Author Commented:
Let me explain better
the user running the setup has two possibilities ...
1. Client
2. server

If you choose 1. This installation package will install only Software.exe

if the user chooses 2. This installation package will install the Software.exe and mysql.exe

can you help me with a code example?
0
CompTIA Network+

Prepare for the CompTIA Network+ exam by learning how to troubleshoot, configure, and manage both wired and wireless networks.

mirtheilSoftware DeveloperCommented:
Actually the sample I gave should do what you are trying.  But here's another example.  This example includes the Mysql.exe installer in the setup package. It could be modified to run the installer from a different location.

The way the script works is that the mysql.exe installer isn't run unless the "Server" component is selected.
; -- Components.iss --
; Demonstrates a components-based installation.

; SEE THE DOCUMENTATION FOR DETAILS ON CREATING .ISS SCRIPT FILES!

[Setup]
AppName=My Program
AppVerName=My Program version 1.5
DefaultDirName={pf}\My Program
DefaultGroupName=My Program
UninstallDisplayIcon={app}\MyProg.exe
OutputDir=userdocs:Inno Setup Examples Output

[Types]
Name: "Server"; Description: "Server installation"
Name: "Client"; Description: "Client installation"

[Components]
Name: "Client"; Description: "Client Files"; Types: Client
Name: "Server"; Description: "Server File"; Types: Server

[Files]
Source: "MyProg.exe"; DestDir: "{app}"; Components: Client Server
Source: "mysql.exe"; DestDir: "{app}\installation"; Components: Server

[Run]
Filename: "{app}\installation\mysql.exe"; Components: Server;

Open in new window

0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
danz67Author Commented:
Following your advice I created this script, but eventually I get this error and not part of the installation mysql.exe
; Script generated by the Inno Setup Script Wizard.
; SEE THE  DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!

[Setup]
AppName=OpenGest PRO VERSIONE 4.9
AppVerName=OpenGest PRO
AppPublisher=OpenGest Software
AppPublisherURL=http://www.opengest.net
AppSupportURL=http://www.opengest.net
AppUpdatesURL=http://www.opengest.net
DefaultDirName=c:\programmi\OpenGest Software
DefaultGroupName=OpenGest Software
DisableProgramGroupPage=yes
LicenseFile=G:\PROGETTO OPENGEST\VERSIONI\Condizioni_vendita.txt
OutputBaseFilename=v49PRO
Compression=lzma
SolidCompression=yes
WindowVisible=yes
WizardImageFile=G:\PROGETTO OPENGEST\Setup\Immagini\WizModernImage-IS.bmp
WizardSmallImageFile=G:\PROGETTO OPENGEST\Setup\Immagini\WizModernSmallImage-IS.bmp

[Languages]
Name: italian; MessagesFile: compiler:Languages\Italian.isl

[Types]
Name: Server; Description: Server installation
Name: Client; Description: Client installation

[Components]
Name: Client; Description: Client Files; Types: Client
Name: Server; Description: Server File; Types: Server

;Name: "readme"; Description: "Readme File"; Types: full
Name: readme\en; Description: Italiano; Flags: exclusive
Name: readme\de; Description: Inglese; Flags: exclusive

[Tasks]
Name: desktopicon; Description: {cm:CreateDesktopIcon}; GroupDescription: {cm:AdditionalIcons}; Flags: unchecked
Name: quicklaunchicon; Description: {cm:CreateQuickLaunchIcon}; GroupDescription: {cm:AdditionalIcons}; Flags: unchecked

[Run]
Filename: {app}\Installation\mysql.exe

;Filename: "{app}\Installation\mysql.exe";
;Filename: "{app}\Upgrade\Opengest_SW_Updater.exe";
Filename: {app}\installation\mysql.exe; Components: Server
Filename: {app}\OpengestPRO.exe; Description: {cm:LaunchProgram,OpenGest}; Flags: nowait postinstall skipifsilent

;[Registry]
;Root: HKLM; Subkey: "SOFTWARE\Microsoft\Windows\CurrentVersion\Run"; ValueType: string; ValueName: "Opengest_SW_Updater"; ValueData: """{app}\Opengest_SW_Updater.exe"""; Flags: uninsdeletevalue
[Files]
Source: G:\PROGETTO OPENGEST\VERSIONI\4842\OpenGest Vittorio\OpenGestPRO.exe; DestDir: {app}; Components: Client Server
Source: G:\PROGETTO OPENGEST\VERSIONI\4842\OpenGest Vittorio\Report\*; DestDir: C:\Programmi\OpenGest Software\Report; Flags: ignoreversion recursesubdirs createallsubdirs
Source: G:\PROGETTO OPENGEST\VERSIONI\4842\OpenGest Vittorio\Documenti\*; DestDir: C:\Programmi\OpenGest Software\Documenti; Flags: ignoreversion recursesubdirs createallsubdirs
Source: G:\PROGETTO OPENGEST\VERSIONI\4842\OpenGest Vittorio\Scontrini\*; DestDir: C:\Programmi\OpenGest Software\Scontrini; Flags: ignoreversion recursesubdirs createallsubdirs
Source: G:\PROGETTO OPENGEST\VERSIONI\4842\OpenGest Vittorio\Icone\*; DestDir: C:\Programmi\OpenGest Software\Icone; Flags: ignoreversion recursesubdirs createallsubdirs
Source: G:\PROGETTO OPENGEST\VERSIONI\4842\OpenGest Vittorio\Immagini\*; DestDir: C:\Programmi\OpenGest Software\Immagini; Flags: ignoreversion recursesubdirs createallsubdirs
Source: G:\PROGETTO OPENGEST\VERSIONI\4842\OpenGest Vittorio\upgrade\*; DestDir: C:\Programmi\OpenGest Software\Upgrade; Flags: ignoreversion recursesubdirs createallsubdirs
Source: G:\PROGETTO OPENGEST\VERSIONI\4842\OpenGest Vittorio\Last; DestDir: C:\Programmi\OpenGest Software\Last; Flags: ignoreversion recursesubdirs createallsubdirs
Source: G:\PROGETTO OPENGEST\VERSIONI\4842\OpenGest Vittorio\Suoni; DestDir: C:\Programmi\OpenGest Software\Suoni; Flags: ignoreversion recursesubdirs createallsubdirs
Source: G:\PROGETTO OPENGEST\VERSIONI\4842\OpenGest Vittorio\Installation\*; DestDir: C:\Programmi\OpenGest Software\Installation; Components: Server
Source: C:\Data\*; DestDir: C:\Data\; Flags: ignoreversion recursesubdirs createallsubdirs
;Source: "F:\PROGETTO OPENGEST\VERSIONI\4842\OpenGest Vittorio\gestionale\*"; DestDir: "C:\Programmi\MySQL\MySQL Server 5.0\data\gestionale"; Flags: ignoreversion recursesubdirs createallsubdirs
; NOTE: Don't use "Flags: ignoreversion" on any shared system files

[Icons]
Name: {group}\Opengest PRO; Filename: {app}\OpengestPRO.exe
Name: {group}\{cm:UninstallProgram,OpenGest PRO}; Filename: {uninstallexe}
Name: {commondesktop}\Opengest PRO; Filename: {app}\OpengestPRO.exe; Tasks: desktopicon
Name: {userappdata}\Microsoft\Internet Explorer\Quick Launch\OpenGest PRO; Filename: {app}\OpengestPRO.exe; Tasks: quicklaunchicon

Open in new window

error.jpg
0
mirtheilSoftware DeveloperCommented:
That seems to be a MySQL setup error message.  Can you run the mysql.exe program to install it outside of the InnoSetup program?  
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Installation

From novice to tech pro — start learning today.