Vinga Shareware and freeware
Ini fileThe ini file has the same name as this program, but with the .ini extension (normally setup.ini)
It has the following structure:
[Setup] Title=MyProg Setup MSI=MSI\MYPROG.MSI ; CmdLine= ; CmdUpgrade= ; CmdMaintenance= ; CmdDowngrade= ; MSIVer=1.10.1029.0 You can override this version in the OS specific section. 1.10.1029.0 is default [WinNT] SupportedVer=4.0 ; 5.0 for Windows 2000 ; MSIVer=126.96.36.199 InstMSIPath=WinNT\InstMsi.exe ; InstMSIUrl=http://www.mysite.com/howtoinstallmsi.htm [Win9x] SupportedVer=4.0 ; Win95=4.0, Win98=4.10, WinMe=4.90 MSIVer=188.8.131.52 InstMSIPath=Win9x\InstMsi.exe ; InstMSIUrl=http://www.mysite.com/howtoinstallmsi.htm [Msg] ; Msg009=Reboot now!!!
A minimal ini file could look like this:
[Setup] Title=MyProg Setup MSI=MSI\MYPROG.MSI [WinNT] SupportedVer=4.0 InstMSIPath=WinNT\InstMsi.exe [Win9x] SupportedVer=4.0 InstMSIPath=Win9x\InstMsi.exe
If any of the entries [WinNT]\SupportedVer or [Win9x]\SupportedVer is missing, the program can not be installed on that operating system and you get an error message saying "Operating system not supported".
How it works
VSSetup launches MsiExec. The command line used when launching MsiExec is formed as follows:
The name of the MSI file is always added to the end of the command line.
Any external parameters passed to the exe are always put at the start of the command line.
If the parameter CmdLine has been specified it is used without further processing. This can be useful if you always want to launch it with the same parameters.
If no CmdLine is specified, a check is made to see if the same product is already installed.
If an older version of the product is already installed, add CmdUpgrade to the command line. If no CmdUpgrade is specified, "REINSTALLMODE=vomus REINSTALL=All /i" is added. VSINSTALLEDVER is added specifying the installed version.
If a newer version of the product is already installed and CmdDowngrade is not specified, show message Msg011 and then exit with exit code 6. If CmdDowngrade is specified add it to the command line and then add VSINSTALLEDVER to specify the installed version.
If the product is not already installed or the same version is installed, CmdMaintenance is added to the command line. If no CmdMaintenance is specified, just
"/i" is added.
If the program is run on Windows NT/2000 and the WinNT parameter is not specified, or if the program is run on Windows 9x and the Win9x parameter is not specified, the user is told that the OS is not supported.
The program checks that version 1.10.1029.0 or later of Windows Installer is installed.
The required version can be changed by specifying MSIVer for all OS
versions in the Setup section or in the OS specific WinNT or Win9x
If the correct version of Windows Installer is not found on the computer, the InstMsi.exe specified with the InstMSIPath setting in the WinNT or Win9x section is executed. If there is no InstMSIPath setting and InstMSIUrl is specified the default web browser is launched to display the URL. This can be used to give detailed instructions to the user how to install or upgrade Windows Installer.
If neither InstMSIPath nor InstMSIUrl is specified error message 010 is displayed.
The parameter Title is used in any dialogs.
The settings found in the ini file are expanded with the Win32 API function ExpandEnvironmentStrings. This means that any strings enclosed between % and is also an environment variable, will be substituted for that variable.
Some command line parameters that are used by MsiExec are also identified by VSSetup. If /qb is found on the command line VSSetup will not show any modal dialog boxes. If /q is found, no UI will be displayed at all. If the text "REBOOT=ReallySuppress" is found, no automatic reboot will be done by VSSetup if Windows Installer was upgraded. Instead return code 1 is returned.
Setting up the dialogs
To present a nice UI when an upgrade is made, you should make sure that a proper dialog is presented in this case. You can use VSSetupTempl.msi as a template for how to set up the dialogs. The dialog called "Patch dialog" will be displayed when an upgrade is made. (Especially the conditions in the InstallUISequence are interesting.)
A few examples
If you always want to launch the installation as "MsiExec /i", specify CmdLine=/i. This can be useful if you do not support upgrades.
If you want to perform an upgrade that does not rewrite all registry settings, specify CmdUpgrade=REINSTALLMODE=vo REINSTALL=All /i
If you want to make an unattended installation that upgrades if another version is installed and repairs if the same version is installed, specify CmdUpgrade=REINSTALLMODE=vomus REINSTALL=All /qb /i and CmdMaintenance=/qb /f
|0||Installation complete. Note that if REBOOT=ReallySuppress has been set, you must not use the program until the computer has been rebooted.|
|1||Reboot needed before the installation can continue. The installation program should be started again after reboot.|
|2||InstMsi failed due to no admin privileges|
|3||Wrong OS version|
|4||Failed to launch MsiExec|
|5||Incorrect version of MSI|
|6||A newer version is already installed|
|7||InstMsi failed other reason than due to no admin privileges|
VSSetup has built in support for English, German and Swedish. The language will be automatically selected based on the computer settings. (Ask Thomas if you want to make other translations.)
You can replace any messages by specifying it in the Msg section of the ini file. These are the messages:
|Msg000||This product can not be installed on this operating system|
|Msg001||Could not execute %1|
|Msg002||Windows Installer could not be installed. Please verify that you have administrative privileges on this computer.|
|Msg003||Windows Installer successfully installed. You must reboot and restart the installation.
Do you want to reboot now?
|Msg004||Windows Installer returned %1. This is an unknown return code and could mean that there was a problem.|
|Msg005||Checking Windows Installer...|
|Msg006||Windows Installer OK...|
|Msg007||Installing Microsoft Windows Installer...|
|Msg008||Initializing Windows Installer...|
|Msg009||Windows Installer successfully installed. You must reboot your computer. This installation will continue automatically.|
|Msg010||Windows Installer must be installed or upgraded to a later version before you can install this product|
|Msg011||A newer version of this product is already installed.
The installed version is %1 and this installation program is for version %2.
|Msg012||Windows NT 4 Service Pack 6 must be installed before you can install this product|
You may use and distribute VSSetup as much as you like as long as you do not modify the exe file.
|2002-02-13 1.0 b26||Some messages were not loaded from the ini file [Msg] section|
|2001-09-08 1.0 b25||Verifies that SP6 is installed on NT4 before trying to install Windows Installer 2.0.|
|2001-08-31 1.0 b24||Keeps the status window visible during the whole installation of Windows Installer.|
|2001-08-31 1.0 b23||Support for Windows Installer 2.0. If MSIVer >= 184.108.40.206 upgrade will be done even on Windows 2000.|
|2001-08-25 1.0 b22||Probably fixed problem that an installation could hang at the end. It seems like MsiExec waited for VSSetup for some reason.|
|2001-06-11 1.0 b21||Fixed problem that /q did not hide splash window. Added ExpandEnvironmentString processing of ini file settings.|
|2001-02-24 1.0 b20||Added check if a more recent version is already installed. If it is, the default behavior is to display Msg011 and then exit with exit code 6.|
|2001-02-19 1.0 b19||Fixed problems with 'umlaut' in German and Swedish that was not displayed correctly in message boxes.|
|2001-01-27 1.0 b18||Added translation of Msg010 to German.|
|2001-01-26 1.0 b17||Changed the ini file to the OS specific sections WinNT and Win9x. Added support for specifying required version of MSI.|
|2000-11-24 1.0 b16||Fixed problem with reboots in Win9x. Sometimes the program hang instead of rebooting.|
|2000-07-11 1.0 b14||Fixed problem downloading from http:|
|2000-04-05 1.0 b12||Bug fix|
|2000-04-05 1.0 b11||Support for messages in German|
|2000-02-01 1.0 b9||First version available to users outside Vinga|
Download the latest version of VSSetup here.