Gary White
Posts: 2
Joined: Fri Apr 28, 2006 7:31 pm

Problems in building a simple MSI package

I'm a first time user of Advanced Installer 3.9 and have two "newbie" questions. I've gone through the basic and advanced tutorials and haven't found answers to the following. If the answer can found in the documentation let me know where, otherwise I'd appreciate any help with the following scenario.

We are trying to build a very simple MSI package that will update FileMaker. The files are located in the following directory c:\fm82update and a subdirectory c:\fm82update\files. The first directory (c:\fm82update) contains the actual setup.exe executable. The next directory (c:\fm82update\files) contains several INI files, MSI files, MST files, and several other executables, including another setup file (also called setup.exe). To install the update you click on setup.exe located in the c:\fm82update directory. The application will start running. You are presented with three different prompts asking you to supply information about the install (such as installation location, etc.).

When I create the MSI package with Advanced Installer, I supply the location of the two installation directories as described above. The MSI file appears to be created with no problem. When I execute the MSI package it appears to run, but I do not see any prompts during the install. The running of the MSI package does not work, FileMaker is not updated.

What am I doing wrong? It seems to me that I should be able to specify which executable is to be run first when an MSI package is started. Second, how to you supply answers to the prompts when the startup executable is run. Other install programs allow you to put answers to program initiated questions in an “answer” or MST file.

Thanks in advance for any help with this problem. …Gary White
Ionut
Posts: 605
Joined: Tue Nov 22, 2005 11:29 am
Contact: Website

Hi Gary,
The first directory (c:\fm82update) contains the actual setup.exe executable.
The next directory (c:\fm82update\files) contains several INI files, MSI files, MST files, and several other executables, including another setup file (also called setup.exe).
From what you describe, I assume that these are the files and folders that you add in Advanced Installer (consequently these files will be installed, not the ones contained by the MSI packages from the "fm82update\files" folder). If this is the case, then why are you creating an install package for another installer?

The correct approach would be to determine what files, registry entries etc are created when the update is installed (using "fm82update\setup.exe") and then create a project in AI that will perform the same system modifications. Furthermore, since the package you are installing is Windows Installer based, the MSI package that AI will generate needs to have the same "UpgradeCode", the same Installation Type ("Per-user", "Per-machine" etc) and a higher "ProductVersion" than the old MSI package.

Another approach would be to install the INI files, MSI files, MST files etc and use a Custom Action ("EXE with Working Dir", scheduled on "InstallFinalize") that will launch the appropriate "setup.exe". However, this is not the correct method because the MSI package (the one created in AI) will remain installed.

When I execute the MSI package it appears to run, but I do not see any prompts during the install. The running of the MSI package does not work, FileMaker is not updated.
As I mentioned previously, the MSI package created in AI will install the files that you have added in the Files and Folders page. Updating the "FileMaker" application involves executing the appropriate "setup.exe" bootstrapper (which in turn will launch one of the MSI files with the appropriate parameters, optionally specifying one or more transforms (.MST) files).
It seems to me that I should be able to specify which executable is to be run first when an MSI package is started.
The executables need to be installed before they can be executed (via a Custom Action), as specified above.
Second, how to you supply answers to the prompts when the startup executable is run. Other install programs allow you to put answers to program initiated questions in an “answer” or MST file.
A transform (".MST" file) is a collection of changes applied to a MSI database. By applying a transform to a base installation package, the installer can add or replace data in the installation database. Transforms are applied by specifying them in the "TRANSFORMS" property (either on the command-line or in the "Property" table).

Therefore, in order to use a specific list of transforms to be applied, a MSI package is launched as follows:

Code: Select all

msiexec /i package.msi TRANSFORMS=transform1.mst;transform2.mst
I assume that in your case, a similar command is issued by the bootstrap utility "setup.exe".

Please give me more details about what you are trying to achieve and maybe I can help.

Regards,
Ionut
Denis Toma
Advanced Installer Team
http://www.advancedinstaller.com/
Gary White
Posts: 2
Joined: Fri Apr 28, 2006 7:31 pm

Perhaps I am confused. I don’t want to use AI to copy files, edit the registry, etc. I simply want AI to package up a set of install files (that are provided by any software vendor) into an MSI file. This MSI file will then be “pushed” to all the computers on our network through the use of Microsoft’s Active Directory. As part of the computer startup, the MSI package is run. In turn the MSI package runs the setup routine provided by the vendor.

Given this scenario I have three questions:
Question 1: - Can you use AI to create an MSI package from an existing set of setup files as provided by any software vendor?
Question 2 – Can you then create an appropriate MST file that will allow the AI and the vendor supplied install routine to run silently without end user input or interaction. There are no status screens or dialog screens (because MST file supplies information to the prompt).
Question 3 – How do you create transform (MST) files with AI?

Thanks! ...Gary White
Ionut
Posts: 605
Joined: Tue Nov 22, 2005 11:29 am
Contact: Website

Hi Gary,
Question 1: - Can you use AI to create an MSI package from an existing set of setup files as provided by any software vendor?
You can use AI to create MSI packages that will install any type of files. However, AI does not (currently) support repackaging other applications (that is, importing the settings of other install packages such that the resultant MSI would behave in the same manner as the original install package).

However, as I mentioned in the previous post, you have 2 choices:
1. Determine what system modifications are performed when the application in question is installed (using file and registry monitoring tools etc) and create a package in AI that will perform the same system changes.

See this thread for some hints:
http://www.advancedinstaller.com/forums ... php?t=1187

2. Create a MSI package that will install the setup files of your application and then launch the setup using a Custom Action scheduled on InstallFinalize. Although this is not a "clean" solution (because you actually create an installer for another installer), it happens to work (I believe) when distributing via Active Directory.
Question 2 – Can you then create an appropriate MST file that will allow the AI and the vendor supplied install routine to run silently without end user input or interaction. There are no status screens or dialog screens (because MST file supplies information to the prompt).
Question 3 – How do you create transform (MST) files with AI?
Although AI uses transforms internally to create multilingual install packages, it does not currently provide a means to create them yourself. This feature is already on our TODO list and it will be available in a future release.

However, transforms can be created easily using Orca (MSI database table editor included in the Platform SDK) or even a VbScript (in less than 30 lines of code, including error checking). A sample VBScript for creating transforms is "WiGenXfm.vbs" (available in PSDK). A simple example can be found here:
http://msdn.microsoft.com/library/defau ... nsform.asp

Also note that a transform is generated between two MSI packages, therefore you must customize one of the packages and then create a transform.

Regards,
Ionut
Denis Toma
Advanced Installer Team
http://www.advancedinstaller.com/

Return to “Common Problems”