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

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

Related

Installer for Executing Multiple Installs

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

Create an installer program: read a path to install to, from registry key (something like wix/installshield/nsis)

I would like to create an installer of my program.
However because the installation is quite complicated, I need something more advanced than installshield limited edition.
I have to run another installer from my current one. It doesn't matter if the user press "cancel" or installs the program, I just need to run it.
I have to install a directory structure on user computer which has a lot of files, that's why i'm going mad with wix: 100 files and I should write all of them with my hands in that xml file? Are we mad?
I have to install files from point 2 into a registry key. That's why I was using wix
I played with nsis long time ago and I liked it, but the language is not so nice.
Wix has "similar" problem. I would love using something like C# and things like that otherwise I'll stick with wix but I need a way to add files faster to xml file, can't add 100 files manually.
Any suggestion?
You can give Advanced Installer a try. It has folder synchronization, which means it can batch add contents of folders, with the possibility to filter out certain file name patterns, for example you'd want to filter *.pdb files and add all the rest to the project automatically.
I use it myself and never had a problem.
Wix Heat can generate the wxs source files for you.
You should look at InnoSetup. It has an IDE available that allows drag and drop of files (and multiple select in a file selection dialog), can launch other applications (including additional setup files), create and modify registry settings, and supports pretty complex scripting if needed. It's pretty easy to use, and the documentation is pretty good. It comes with pretty comprehensive sample installations, too.
The installation scripts are created by the IDE and then compiled into an installer, so the script source is editable by hand if needed. It's also not XML, but more like an INI file, so it's a little easier to work with manually as well.
Best of all it's free, and so is the IDE.
I would go back to using NSIS, if you use the HMNSIS editor http://hmne.sourceforge.net/ to write your scripts you can use the Wizard mode to make a list of the files and directory structure you will use in your installer.
Running other installers and registry settings are also easily done with NSIS.

Software Installer - Make separate .exe for each file

Looking for an installer that will take any number of files in a folder and make each file into an exe (not put them all into one exe). Will any installers easily do this? I haven't been able to find a feature name for this, so it's made it difficult to determine from a feature list.
Take a look at Nullsoft installer. About anything can be scripted w/ it.

Is it possible to detect if help file is contained in the setup file (msi or exe)?

I would like to know how can I detect if help file is contained in setup file for windows platform application (msi or exe). Is there any method to get this information without installing the software first ?
Of course setup file can be created by many setup makers like innosetup, installshield and so on. So I wonder if there is some universal method to solve this.
For an MSI based install it would be very easy. For example you can use the Microsoft.Deployment.WindowsInstaller interop via C# to open the MSI as an InstallPackageClass then access it's Files collection to see if it contains the file you care about.
For a Non-MSI based install, there is no universal way and in most cases, no way period. See, that's kind of the point of MSI: to have a standards based package rich in meta data to be able to see what it's doing. When you do some proprietary script driven installer you lose that openness.
If it's a MSI file, open it up using Orca, and you can view file names.
For both of them, you should be able to do an administrative install, which would extract the files, but not register anything. Depending on where the exe came from, doing an administrative install changes, since each vendor(installshield, innosetup, etc) has their own way to run an administrative install.
for a MSI it's simply
msiexec /a <msi_filename>
For an exe you'll have to look up how to pass the /a argument.

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

Resources