Creating automated Installer for any Program
Asked Answered
H

1

6

How can I create an automated Installer for a program that has a regular Installer with questions like:

  • Install Directory,
  • Accepting License,
  • Creating Icon on Desktop
  • etc...

Assuming that I am OK with building an Automated Installer for every program I want to separately, Or i want to put files in a Self Extracting Archive and run the Installer after unpacking.

Do I need a third party program for it? Should I use Command Prompt? Do I need to learn Lua? (I'm learning C#)

EDIT:

To clarify I'll use an example:

  • Let's say i wrote a program but that program has a requirement, like DirectX, or Adobe Air, or Maxthon Browser.
  • I wrote my program in such a way that I have to be sure that that is installed in a very specific Drive/Folder on the PC or with some specific preferences/parameters.
  • I include an installer for this program, but I want to specify where it gets installed on the PC and with what parameters.
  • Preferably Installing this requirement right after or during the Installation/Extraction of my own program.

I'm looking for a way to be able to run the Installer of any given program and navigate through the install wizard of it with out the user having to/being able to change the settings I need (with the foreknowledge and permission of the user of course).

It doesn't need to be silent install or anything.

Hectic answered 9/7, 2013 at 15:36 Comment(0)
T
8

I have rewritten my answer.

Your mentioned setups requirements seem very common to me for the class of installation programs (setups) and not at all unusual.

Generally you have two options:

You write everything on your own, you create the install dialogs, the way the settings are saved, and so on. Then you are fine with C# (or any other language).

It is quite uncommon to do so, because it is time consuming, and you are reinventing things which have been solved in standard ways several times. Moreover you will fall in common setup error traps which are maybe already captured (or at minimum documented) if using tools.

If you want to use a tool, it is your first decision, if you want a tool based on MSI (Windows Installer) or not. MSI is the most powerful and most industrial-accepted setup technology in Windows, but it is a quite complicated matter, and no tool can shield this 100% from you. Google for WiX (Open Source) or InstallShield as starting points for MSI tools but there are of course more. Some tools are already integrated or integrateable in Visual Studio for example.

Selfextracting tools are a starting point, but the following tools offer far more and are a good intermediate way between the extreme points SFX and MSI:

InnoSetup

(has also a home here on SO).

Nullsoft Scriptable Install System (NSIS) on SourceForge

One self extracting program in Windows I want to mention, because it is not widely known, that "IEXPRESS.exe" is already included in the OS.

Concerning your special question of navigating through the install wizard: Every mentioned tool has ways to save install settings and of course is deciding which settings are changeable by the user part of the 1*1 of setup creation. With the tools you can design the install dialogs like you want consisting of the parts you want.

I hope I got your point.

P.S. While most tools have kind of a scripting language or something similar included, you are normally free to extend the installation process with your own actions written in nearly every programming language you like.

Temptress answered 9/7, 2013 at 16:31 Comment(2)
Thanks! I actually write my own Installer for my programs, but I edited the question to clarify what I mean. Also for self extracting archives i found WinRar to be perfect, it really has a lot of settings, and it allows me to include a recovery record too.Hectic
Thank You! This has been very informative, I'll be sure to check out everything you mentioned.Hectic

© 2022 - 2024 — McMap. All rights reserved.