Installer for Executing Multiple Installs - installation

I've been to stackoverflow.com many times, but this is my first time posting here. I'll try to be as specific and to the point.
I'm in the process of converting all my PC discs into digital .iso files and there's a few games I have that are multi-install discs.
Recently I've started using Inno Setup and so far I've had a lot of success consolidating multi-disc installs into a single program executable.
The one I'm currently focusing on is the Battlefield 1942 series. It requires initial installation, multiple expansion installs, plus a major patch, plus the installing of a mod that takes multiple steps.
My question to the community is how would I pack all of the above files into one executable and have them install everything in order? If it can be done through Inno, I'd like to try that. Or if you suggest another program I can always take time to try and learn it.
I've tried making a batch file for this a while ago but it ended up kind of clunky and I really didn't like the way it turned out.
Also, is there a way to insert check boxes into Inno to choose what executables run? (this part of the post isn't as important as the above request, just kind of a bonus if possible).
Really looking forward to the community's response on this!

One approach you can follow is to create a installer of installers, where you just pack the installers you have now and at installation time run each in the precise order you do now to get your fully installed and patched game.
That way, you don't have to learn each file/registry key or other settings each game have, and the risk of failure if you forget to include something vital to it.
What you have to do in order to do that properly, is to learn if the current installers accept it's own configuration from command line parameters or text files (many installers do it, for example the /silent or /verysilent command line parameters to run on the background). Once you do, use the [run] section of your script to launch each installer passing the parameters via command line or pre-made text files, or even you can create a text file or command line parameters on the fly using the [code] section with the built-in pascal script.
If your installers don't accept parameters, you can even reach your goal to keep all in one single exe file which you can run and then configure each individual installer as it launches.
Your question is overly broad to include here a working example, but you can find guidance by studying the scripts in the samples directory.
As for your final question
Also, is there a way to insert check boxes into Inno to choose what executables run?
You can use the [run] section to let the user select what to run at the end.
Or you can use the [tasks] section to create different sets of files/configurations.
A final word is to check the available flags for your install script entries, for example, deleteafterinstall to cleanup individual installer included among your [files] entries, or the [uninstallrun] section to give a unified uninstaller also.

In my opinion, if the final result should be fully patched version with mod installed, you should build new installer that will contain that fully patched game with mod.
You can do it easy way to find out what is changed/added by each patch, addon, MOD.
After installation of each thing (addon/mod/etc.) make a backup copy of the installation folder and check the registry entries.
Then just compare folders/directories and filter out specific files for each patch, addon, MOD.
At the end you will be able to add each addon and MOD as Components (files and registry entries) - that will create checkboxes in the Components Selection Wizard Page.
Easiest way:
For External Installers/3rd Party Apps at the end of installation more info to be found here: http://www.jrsoftware.org/ishelp/index.php?topic=runsection

Related

Looking for the simplest way to wrap a provided Setup.exe installer with a config.dat and a silent installation CLI execution

I am not familiar with Windows installer builder tools, other than having a conceptual understanding of them. I have a hopefully simple installer-file-wrapping-problem to solve where i would need some advice from people who know this field better than myself:
I have a vendor provided vanilla Setup.exe installer along with a custom config.dat file.
I can run the installer with "Setup.exe /S" which picks up the config.dat file in the same directory for a silent install just as I need it.
I now want to wrap both files into a single file self executable installer "CustomSetup.exe" that if launched with "Run as Administrator" silently unpacks the two files into the same directory, runs the silent install command line "Setup.exe /S" and deletes the previously unpacked files and directory afterwards. Effectively giving me a single-file one-click silent installer with custom settings from the vendor provided vanilla installer.
What is the simplest, most straight forward and elegant way of getting this done?
Most InstallShield/WIX/Windows Installer Tools tutorial- and documentation-pages i could find want to take me to an elaborate installer-project-building-academy first, something that is certainly useful for developers needing to learn how to build complex installer projects, but feels like overkill for just getting this seemingly simple thing done. Is there a lean way to do this? Many thanks in advance for your help.
For the record, I have found the answer to my own question.
Running the Windows on-board IExpress (as Administrator) easily produced exactly what I was after. Just type "Iexpress" into the command search box, run as Administraor and fidlle with it. Alternatively, this is someones Video explaining it https://www.youtube.com/watch?v=vXZyq0cMuKI

InstallShield: Insert powershell custom action to install sequence

I'm having installshield project and I several powershell custom actions.
The scripts change the file system (extract zip files, copy files, install packages, etc).
I wonder where in the install sequence should I put them?
I looked at the guilde here but they don't cover it.
I tried to put it in the execute sequence after "InstallInitialize" but that made my scripts behave weird (some of the cmdlets work and some don't).
Then I moved them to the UI sequence after "ExecuteAction" and that seems to be working fine but I read somewhere that I shouldn't put in the UI sequence any scripts that change the file system..
What is the right place?
Thanks
Events that change the system should not be placed in the UI sequence, one reason is that there isn't anything preventing your user from skipping the UI sequence.
During the execute sequence, you cannot install another MSI package. Some installers may look like a .exe but have a bundled MSI. If your goal is to handle installing prerequisites, then you need to possibly use the InstallShield Suite/Advanced UI install. That has a method of managing multiple install prerequisites. I suspect that the problem you encounter is that some of those packages you try to install have imbedded MSI installs.

Can't add multiple files - limitation of Windows Installer?

I've been looking at various different ways of making an installer (see How to create a robust, minimal installer for Windows? for details), and I've run into the same thing in a couple of them (WiX and the visual studio installer creator); there doesn't seem to be a way to say "When you build the installer, include every file matching c:\somefolder\*.xml".
I can go and select *.xml and add all the files that match to the project at once, but then if I add another .xml file to my program later, I'd need to go and add that to the installer myself.
Is this a core limitation of windows installer, that I can't just tell it "sort all the XML files in this folder out and don't bother me about them"?
WiX toolset contains an utility called Heat. It can generate the WiX authoring for you based on your needs. The output can be further transformed by XSL templates (-t switch).
Hope this helps.
InstallShield also has this ( see Dynamic File Linking ) but honestly I don't like this pattern in general. It's non-deterministic in nature. I speak from 14 years of experience when I say that if a file is added or removed from my application I want to explicitly add it or remove it from my applications installer. Any magic to automate this has always bitten me in that it takes what should have been a build time error and turns it into a run time error.
My best practice is to write some automation that compares what was available to be consume against what was consumed by the installer. The two lists must match 100% or otherwise fail the build. When the build fails you must choose to either add the file to the installer or cease to archive the file to the directory. With the right tooling, it's trivial to add a file to the installer and the result is 100% accuracy of developer intent being applied to the installer.

How to find the setup location in an VBScript custom action for InstallShield?

In an InstallShield project I have a VBScript custom action that conditionally needs to execute a certain file packaged with the install.
Normally I get the current directory of a vbs using code such as
sCurPath = CreateObject("Scripting.FileSystemObject").GetAbsolutePathName(".")
Which, if it returned the location of the Setup.exe that initiated the install, should work.
However when running the install, the current path (on XP) is C:\Windows\system32 instead of the location of the Setup.exe file I was expecting.
Assuming the output of my InstallShield build looks like the following
Disk1
->Setup.exe
->ISSetupPrerequisites
-->Req1
-->Req2
-->...
->OtherReqs
-->ConditionallyRunMe.exe
How could I run "\OtherReqs\ConditionallyRunMe.exe" from a VBScript custom action?
Thanks!!
(Note: I realize there are ways to conditionally run exe files from withing InstallShield, but in this case the requirements are not supported by InstallShield - unless there is a way to use a VBScript custom action return value as a condition to run another file?)
After a lot of messing around, I got it (actually found it in the InstallShield manual, and not Google, go figure :))!
This line of VBScript does the trick
disk1Path = Session.Property("SETUPEXEDIR")
The line above points to where ever the setup exe file was, so from there it's trivial to run any exe included with your install media.
Other useful ones I found, which I'll past here for reference are
'points to app data\downloaded install directory
MsgBox Session.Property("SourceDir")
'where the software wants to install to on the users system
MsgBox Session.Property("INSTALLDIR")
Not sure why it's so hard to find a good reference on MSI Standard properties (even just a list). The closest I found was this, but not all of them work (and not specifically for InstallShield at all). If anyone finds a good link with documentation about MIS Standard properties and their description please add a link here, so no one has to waste as much time on this as I did :).

Freeware tool for creating a single file installer from an msi file + config file (thats easy enough for an End-User to use)

My installer requires there be two files in the same directory in order for it to install.
The installer (.msi file)
An organization specific config file that the installer copies. (This file is customized by the organization and then distributed to it's end users).
Since there are two files, the file has to be distributed as a zip file. Which presents the issue of if a user tries running the .msi without actually extracting the zip... only the msi file gets extracted. I am able to detect the issue in the install process and tell the user they need to unzip the file... but you know how noone actually reads error messages.
So, I'd like to make it more foolproof and so i was wondering if there was a simple tool that i could let my customers (ie the organization) be able to make modifications to the config file and when finished create a .exe file which when clicked would extract to a temp folder and then run the msi. I know there are solutions for this which require commercial software. I'm wondering if a simple freeware tool exists that can do this.
Edit: Accepted Solution Notes:
The one issue i ran into is the iexpress wasn't designed to be used for .msi files. As a result on the step that asks you for the Install Program. It's a combo box which if you had added a .exe file in the previous step could just select the .exe file from. Instead you have to manually type in
msiexec /i yourinstaller.msi
I was very pleased to find such a simple solution that's built in to windows. The only way this could be better is if it allowed for wildcards so that your iexpress project would be able to handle changes in the msi file's name which occur with each version. And defaulting the Install Program to the .msi file. These minor inconveniences are offset by the fact that end user wouldn't need to install any new software to create the package so I have stopped looking for other tools.
You could try using iexpress.
It enables you to package up a set of files which can be extracted, with the option of running an installation command automatically after extraction. It also has options to enable you to prompt users about things, show a EULA, restart the computer, etc..
I believe it comes as part of Windows (part of IE?) - try running iexpress.exe from the run dialog to get the UI.
The Wix project has a bootstrapper and packager for dealing with this kind of thing.
I've used wix a lot but haven't really looked at the bootstrapper/packager much - last time I had a quick look it wasn't really usable but that was a long time ago so it may be better now.
I'm guessing that the config file is something like a properties file, and that you want users to set the values of the properties "foo" and "bar". You don't need a separate tool to update the file.
I would do this:
Put one or more dialogs in the install that ask the user what the values of foo and bar should be, and set a couple public properties accordingly.
Write a custom action that writes the config file out to whatever location you want, including whatever values you want for foo and bar. This would be pretty easy in vbscript.
Put the custom action somewhere in the execute sequence (ideally as a deferred execution action, since you're making changes to the system).
Add an entry to the RemoveFile table, so the config file is removed on uninstall (assuming you don't want it to be left behind.)
Add an entry to the LaunchCondition table, to prevent users from doing a silent install. Or if you want silent install to be allowed, make the names of the public properties that hold the config data known, and make them part of the LaunchCondition. You would block "msiexec /i myapp.msi", but you could choose to allow "msiexec /i myapp.msi FOO=Something BAR=SomethingElse".

Resources