InnoSetup Chainned installers MSI file - installation

I made an installer with InnoSetup and I need to run some msi files after the normal instalation.
I added the next lines of code:
[Files]
Source: "..\..\..\Dependencies\sqlncli2012.msi"; DestDir: "{tmp}"
Source: "..\..\..\Dependencies\SQLSysClrTypes.msi"; DestDir: "{tmp}"
Source: "..\..\..\Dependencies\SQLServer2012_XMO.msi"; DestDir: "{tmp}"
Source: "..\..\..\Dependencies\SqlCmdLnUtils.msi"; DestDir: "{tmp}"
[Run]
Filename: "msiexec.exe"; Parameters: "/i IACCEPTSQLNCLILICENSETERMS=YES""{tmp}\sqlncli2012.msi"" /qb"; StatusMsg: Installing MySQL Server;
Filename: "msiexec.exe"; Parameters: "/i ""{tmp}\SQLSysClrTypes.msi"" /qb"
Filename: "msiexec.exe"; Parameters: "/i ""{tmp}\SQLServer2012_XMO.msi"" /qb"
Filename: "msiexec.exe"; Parameters: "/i ""{tmp}\SqlCmdLnUtils.msi"" /qb"
I have seen there is a similar question but I just can't figure out what I did wrong.
I made a fresh install of windows 7 in a virtual machine and I get the following errors:
http://i.imgur.com/a2tPnGW.png
http://i.imgur.com/PUwjDz7.png
As you can see I get error at the last msi file, SqlCmdLnUtils, and the ones before do not even start. (I also tested without "IACCEPTSQLNCLILICENSETERMS=YES" and I get the following error "The required IACCEPTSQLNCLILICENSETERMS=YES command-line parameter is missing. By specifying this parameter...),so the fact that the installation file does not exists drops.)

I managed to fix this by removing the "/qb" which means Basic UI, so by default will be Full UI and by moving files from {tmp} to {app} folder but I don't think that is necesarry.
Source: "..\..\..\Dependencies\sqlncli2012.msi"; DestDir: "{app}\Installation Files";
Source: "..\..\..\Dependencies\SQLSysClrTypes.msi"; DestDir: "{app}\Installation Files";
Source: "..\..\..\Dependencies\SQLServer2012_XMO.msi"; DestDir: "{app}\Installation Files"
Source: "..\..\..\Dependencies\SqlCmdLnUtils.msi"; DestDir: "{app}\Installation Files"
[Run]
Filename: "msiexec.exe"; Parameters: "/i ""{app}\Installation Files\sqlncli2012.msi"; StatusMsg: Installing SQL Server Native Client;
Filename: "msiexec.exe"; Parameters: "/i ""{app}\Installation Files\SQLSysClrTypes.msi"; StatusMsg: Installing SQL SysClrTypes;
Filename: "msiexec.exe"; Parameters: "/i ""{app}\Installation Files\SQLServer2012_XMO.msi"; StatusMsg: Installing SQL Server XMO;
Filename: "msiexec.exe"; Parameters: "/i ""{app}\Installation Files\SqlCmdLnUtils.msi"; StatusMsg: Installing SQL CmdLnUtils;

Related

InnoSetup - Setting icon of the unisXXX.exe file

I'm trying to get the icon of the unisXXX.exe file to change, and have only been successful by accident.
Here is my .iss (irrelevant fields excluded; have to hand jam this) file:
#define AppName "My App"
#define AppExeName "run.exe"
#define AppSource "C:\Path\To\App\Src"
[Setup]
SetupIconFile={#AppSource}\foobar\app.ico
UninstallDisplayName={#AppName}
UninstallDisplayIcon={#AppSource}\foobar\app.ico
;UninstallIconFile={#AppSource}\foobar\app.ico
;Ignored since 5.0.0 apparently
[Files]
Source: "{#AppSource}\{#AppExeName}"; DestDir: "{app}"; Flags: ignoreversion
Source: "{#AppSource}\dll\*"; DestDir: "{app}\dll"; Flags: ignoreversion recursesubdirs createallsubdirs
Source: "{#AppSource}\foobar\*"; DestDir: "{app}\foobar"; Flags: ignoreversion recursesubdirs createallsubdirs
[Icons]
Name: "{autoprograms}\{#AppName}"; Filename: "{app}\{#AppExeName}"; IconFilename: "{#AppSource}\foobar\app.ico"
Name: "{autodesktop}\{#AppName}"; Filename: "{app}\{#AppExeName}"; IconFilename: "{#AppSource}\foobar\app.ico"
Name: "{group}\{cm:UninstallProgram,{#AppName}}"; Filename: "{uninstallexe}"; IconFilename: "{#AppSource}\foobar\app.ico"
Now I also have a [Code] section that executes a series as follows:
CurStepChanged -> CurStep = ssInstall -> IsUpdate -> True -> UninstallPriorVersion
Where IsUpdate checks the registry values for the installation and if the new installer is newer, then UninstallPriorVersion uninstalls the old version before installing the new version.
After I compile the .iss the app.ico is applied to the setup executable; and once I run the executable, the icons for the program menu, add/remove programs and desktop icon are all applied correctly. The unisXXX.exe however remains as the computer with a disc icon, and it is only changed to the same icon as the setup executable once a new installer version is run and then the old one is uninstalled, giving me a unis001.exe with the appropriate icon.
Is there any indication why the icon is not being applied to the unis000.exe?

Inno Setup: Run external driver installer only if its component is checked

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).

Inno Setup: Application won't start

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.

Inno Installer not creating sub-folder after installation

I need to create the an installer for my application. I am using Inno for doing this, I am following the GUI for doing it like from File->New...and set all the files and folders required for my application.
My application contains sub-folder and in which there are some resource file. After installer create installation package, I have tested the application installation, but it seems all the files are copied to same folder of exe, no sub-folder creating.
Here the complete script which generated by Inno
; Script generated by the Inno Setup Script Wizard.
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!
#define MyAppName "APP"
#define MyAppVersion "1.5"
#define MyAppPublisher "My Company, Inc."
#define MyAppURL "http://www.example.com/"
#define MyAppExeName "AppName.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={{E327E502-E384-48AA-A190-82DD14B6FE07}
AppName={#MyAppName}
AppVersion={#MyAppVersion}
;AppVerName={#MyAppName} {#MyAppVersion}
AppPublisher={#MyAppPublisher}
AppPublisherURL={#MyAppURL}
AppSupportURL={#MyAppURL}
AppUpdatesURL={#MyAppURL}
DefaultDirName={pf}\{#MyAppName}
DefaultGroupName={#MyAppName}
OutputBaseFilename=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: "C:\Users\me\Desktop\InstallerCreation\App\App.exe"; DestDir: "{app}"; Flags: ignoreversion
Source: "C:\Users\me\Desktop\InstallerCreation\App\avcodec-55.dll"; DestDir: "{app}"; Flags: ignoreversion
Source: "C:\Users\me\Desktop\InstallerCreation\App\Resources\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs
; 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
You can see a folder name Resources inside App directory, which should be created while installation with it's content. But right now no folder get created and all content of Resource folder is copied exe directory.
Platform: Windows8 64 bit.
The script creation wizard puts all the added stuff into the application destination base folder, {app}. The subfolder would be created if you added the whole deployment folder:
C:\Users\me\Desktop\InstallerCreation\App\
That would create entry like this:
[Files]
Source: "C:\Users\me\Desktop\InstallerCreation\App\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs
The recursesubdirs flag there instructs the setup that for this folder should be recursively included all the files matching the * pattern. That would include also your \Resources subfolder.
At this time you can for example specify the target subfolder in the DestDir parameter:
[Files]
Source: "C:\Users\me\Desktop\InstallerCreation\App\Resources\*"; DestDir: "{app}\Resources"; Flags: ignoreversion recursesubdirs createallsubdirs
But the best you can do is making a dedicated folder for deployment and add everything it contains by a single entry like this:
[Files]
Source: "C:\MyApp\Deployment\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs

Inno IDE Eliminate View checkbox after installation

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

Resources