Basic MSI silent install

Articles and post about silent install for Basic MSI, InstallScript, InstallScript MSI:

 

Silent-mode installations

HOWTO:InstallShield中如何制作静默安装包-IntallScript或InstallScript MSI工程类型

 

______________________________________________________________________

Following content is provided by gtzpower.

Original link: Basic MSI and Silent Install (/qn)

 

Just giving back to the community

 

I never did find a good tutorial on how to do this for a beginner, so I wrote one for our local knowledgebase, and decided to share it here. Thanks to RobertDickau and Jennifer of the help:

Making Basic MSI Silent Installs

With a Basic MSI project, you typically do not need to modify the project itself to create a silent installation. You supply data such as serial numbers and installation directories to the MSI package through msiexec.exe parameters. First, you should find a list of applicable parameters. Run through a complete install while logging the properties being modified. Start the process by issuing one of the following commands:

For EXE files: setup.exe /v"/Lp properties.log"

For MSI files: msiexec /i myinstaller.msi /Lp properties.log

When that is finished, there will be a properties.log file in the directory where the installer is stored. This file will list all of the properties where you will find the values you entered. (if you entered a CD Key of 1122334455, you may see a line like this: “Property: SERIALNUMBER=1122334455”). You now know that the property named “SERIALNUMBER” stores the value for your CD Key. After discovering the parameter names, you can supply them to the installer using one of the methods listed below:

1: Supply arguments to msiexec.exe through the setup.exe command from a command prompt (setup.exe /s /v”/qn SERIALNUMBER=1122334455”). The /s executes the install silently while the /v”” passes any options in the quotes directly to the msiecxec.exe executable.

2: Supply arguments directly to msiexec.exe (msiexec /qn /i myinstaller.msi SERIALNUMBER=1122334455). The /qn runs the install silently.

3: Supply arguments to msiexec.exe through the Setup.ini file. This is useful when many parameters are needed and command line length limitations become a problem. Open the Setup.ini file, and find the “CmdLine=” key. Just directly type your msiexec.exe arguments here (CmdLine=/qn SERIALNUMBER=1122334455 INSTALLDIR=”C:\My Install Dir”). Once the parameters are in, run “setup.exe /s” to install silently

None of the options above will require modification of the InstallShield project, however, lets assume that you have a 3rd party application designed to “Upgrade” a database during the install. You may need to control that program as well. First, you should make the program itself accept command line parameters (or research the documentation for the 3rd party app to discover existing parameters). Once the 3rd party app is able to be controlled by command line parameters, you can pass parameters to the app from msiexec.exe. In InstallShield, create a new PUBLIC property (Public properties are simply all uppercase property names). This can be done in the “Property Manager”, and we’ll name ours “MYARGUMENTS”. Next, in the custom actions section, select the action that launches your 3rd party app, and fill in the “Command Line” field with “[MYARGUMENTS]”. Now, any arguments passed to the installer can be sent to the 3rd party app. (setup.exe /s /v”/qn SERIALNUMBER=1122334455 MYARGUMENTS=/U” - this would pass /U to the application specified in your custom action that you recently modified with [MYARGUMENTS]).

NOTE: Silent installs will completely skip the UI sequence. If you are using custom actions, make sure they are being called in the execute sequence.

Last edited by gtzpower; 08-24-2006 at 11:52 AM.

____________________________________________________________________________

 

你可能感兴趣的:(Install)