Pages

Friday, 22 June 2012

MSI Feature Table



Feature table explains the logical tree structure of features. There should be atleast one feature in every MSI file. And a feature can have a parent and child features also. Feature table contains the list of features that are present in a specific MSI file. The following are the columns of Feature table:

For example suppose there are two features Feature 1 and Feature 2 in a specific msi file.  Suppose ‘Feature 1’ feature is child feature of ‘Feature 2’ feature.

Let us discuss about the feature ‘Feature 1’.
Feature Column:
 It is a Primary key used to identify a particular feature record. Feature column shows Feature 1 as primary key for feature Feature1.

Feature_Parent:
Feature 2 will be its parent feature, since Feature 1 feature is a child feature of Feature 2.

Title:
Title will be the Short string of text identifying the feature. So in this case it will be Feature 1.

Description:
Longer string of text describing the feature. It can be NULL

Display:
     
Value
Appearance in UserInterface
NULL
Feature not displayed
ODD NUMBER
Displayed as expanded
EVEN NUMBER
Displayed as collapsed


Level:
The initial installation level of this feature. An install level of zero disables the item and prevents it from being displayed.

Directory:
Directory_ column specifies the name of a directory that can be configured. In this particular example the Directory is INSTALLDIR.
Directory
Full path
1) INSTALLDIR
C:\ProgramFiles\{Application Name}.
Ex: “C:\Program Files\Adobe”. Where Adobe is application name.
2) TargetDir
Ex: “C:\”


Attributes:
This field specifies the remote execution option for features that have not yet been installed and for which no feature state request has been made using any of the properties. If this field is blank, the value defaults to 0. 

First Time Self Healing


If the package is containing some HKCU entries then the package will always go for self healing for the first time. This happens because the HKCU keys are only installed for the current user present while installing the package and not all the users as it is the property of the HKCU. So, if other user logs
in then there is a mismatch between the current system state and the value specified in the MSI package (e.g., a key file is missing), then the related feature is re-installed. This is called the Self Healing.

ARP related Properties in MSI

Add/Remove Programs related MSI Properties





Property name
Brief description of property
ARPAUTHORIZEDCDFPREFIX
URL of the update channel for the application. The value the installer writes under the Uninstall Registry Key.
ARPCOMMENTS
Provides Comments for the Add/Remove Programs in the Control Panel. The value the installer writes under the Uninstall Registry Key.
ARPCONTACT
Provides the Contact for Add/Remove Programs in the Control Panel. The value the installer writes under the Uninstall Registry Key.
ARPINSTALLLOCATION
Fully qualified path to the application's primary folder. The value the installer writes under the Uninstall Registry Key.
ARPHELPLINK
Internet address, or URL, for technical support. The value the installer writes under the Uninstall Registry Key.
ARPHELPTELEPHONE
Technical support phone numbers. The value the installer writes under the Uninstall Registry Key.
ARPNOMODIFY
Prevents display of a Change button for the product in Add/Remove Programs in the Control Panel.
Note   This only affects the display in the ARP. The Windows Installer is still capable of repairing, installing-on-demand, and uninstalling applications through a command line or the programming interface.
Windows NT 4.0 and Windows 98/95:  Clicking on Add/Remove for the product uninstalls the product after prompting the user to confirm the uninstallation.
ARPNOREMOVE
Prevents display of a Remove button for the product in the Add/Remove Programs in the Control Panel. The product can still be removed by selecting the Change button if the installation package has been authored with a user interface that provides product removal as an option.
Note   This only affects the display in the ARP. The Windows Installer is still capable of repairing, installing-on-demand, and uninstalling applications through a command line or the programming interface.
Windows NT 4.0 and Windows 98/95:   This property prevents display of the application in the Programs List of the Add/Remove Programs in the Control Panel.
ARPNOREPAIR
Disables the Repair button in the Add/Remove Programs in the Control Panel.
Note   This only affects the display in the ARP. The Windows Installer is still capable of repairing, installing-on-demand, and uninstalling applications through a command line or the programming interface.
ARPPRODUCTICON
Identifies the icon displayed in Add/Remove Programs. If this property is not defined, Add/Remove Programs specifies the display icon.
ARPREADME
Provides the ReadMe for Add/Remove Programs in Control Panel. The value the installer writes under the Uninstall Registry Key.
ARPSIZE
Estimated size of the application in kilobytes.
ARPSYSTEMCOMPONENT
Prevents display of the application in the Programs List of the Add/Remove Programs in the Control Panel.
Note   This only affects the display in the ARP. The Windows Installer is still capable of repairing, installing-on-demand, and uninstalling applications through a command line or the programming interface.
Windows NT 4.0 and Windows 98/95:  This property has no effect.
ARPURLINFOABOUT
URL for application's home page. The value the installer writes under the Uninstall Registry Key.
ARPURLUPDATEINFO
URL for application updates information. The value the installer writes under the Uninstall Registry Key.

How to hide Drives in My Computer?


Create registry as described below:


HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer
Name: NoDrives
Data Type: REG_DWORD
Value: varies - see below
  
To calculate the value to use, add up the following codes for the drives that you want to hide:
A=1
B=2
C=4
D=8
E=16
F=32   
For instance to hide the E and F drives, the value would be 48

How Should I add my Application to Run at Startup?


If you want to do it for all users on a system, create a entry in following registry hive


HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Run


If you want to do it for Current User create entry in following registry hive


HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run

Process for Creating InstalShield Response file (iss)


Here is an example of how to create the response file:
1.      Download the j2re1_4_0-win.exe installation bundle.
  1. Run the JRE installation bundle with the additional flags -a -r -f1"<path><filename.iss>", where path is the path to filename.iss and filename.iss is the name you want to use for your setup.iss file. For example:
j2re1_4_0-win.exe -a -r -f1"C:\setup.iss"
Note that there is no space between -f1 and "<path><filename.iss>"
  1. Go through the install dialogs as normal, selecting the options that you want to be used in subsequent silent installs.
InstallShield will record all of your installation choices in your setup.iss file. This response file can be used later for the silent installation.
Here is an example of a response file:
[InstallShield Silent]
Version=v5.00.000
File=Response File
[DlgOrder]
Dlg0=SdLicense-0
Count=2
Dlg1=SdAskDestPath-0
[SdLicense-0]
Result=1
[SdAskDestPath-0]
szDir=C:\Program Files\Java Plug-in 1.4
Result=1
[Application]
Name=Java Plug-in
Version=1.4
Company=JavaSoft

Running InstallShield in Silent Mode

After you have created the response file, you are ready to run the installation in silent mode using InstallShield Silent. When running an installation in silent mode, be aware that no messages are displayed. Instead, you can request creation of a log file, which will record installation information, including if the installation was successful. You can review the log file to determine the result of the installation.
To launch InstallShield Silent, run your j2re1_4_0-win.exe install bundle with the flags -s -a -s -f1"<path><filename.iss>", where path is the path to filename.iss and filename.iss is the name of your setup.iss file. If you want to register Plug-in with Internet Explorer and/or Netscape 6, include the -iexplorer and/or -netscape6 options in the command line. They can be in any order but must come after the -a and before the second -s. For example,
j2re1_4_0-win.exe -s -a -iexplorer -netscape6 -s -f1"<path><filename.iss>"
Note that there is no space between -f1 and <path><filename.iss>.
If you are doing this from an MS-DOS shell, you may find it convenient to use the "start /w" command, as that will cause MS-DOS to wait until the install is complete. For example:
start /w j2re1_4_0-win.exe -s -a -s -f1"C:\setup.iss"

Creating a Log File

If you want to create a log file describing the installation, use the additional flag -f2"<path><filename.log>". This will cause the log to be written to the filename.log file. For example:
start /w j2re1_4_0-win.exe -s -a -s -f1"C:\setup.iss" -f2"C:\setup.log"
Note that there should be no space between -f2 and "<path><filename.log>"
To verify if a silent installation succeeded, look at the ResultCode value in the [ResponseResult] section of setup.log. InstallShield writes an appropriate return value after the ResultCode keyname. 

How to make an MSI unattended by default


By default, when you double-click on an MSI file it prompts you to click Next until you finish installing the application. You can run the MSI unattended from the command line using the /QN switch but that requires typing. What if you need/want to be able to double-click on the MSI file and have it run the MSI unattended? 

Here's how:
-Go to the Setup Editor view:
-Click the Dialogs tab and un-select the following:
-Install Dialogs -> Welcome Dialog Wizard
-Install Dialogs -> Exit Dialog
-Maintenance Dialogs -> Exit Dialog