Working on MSI or MST with InstEd It, free MSI editor built for professionals.
.
1. Insted It !
InstEd is a free MSI editor built for professionals.
It’s a good free alternative to Wise Package Studio or Admin Studio.
Official website: http://www.instedit.com
.
MSDN of Installer Database Tables Reference:
http://msdn.microsoft.com/en-us/library/aa368259.aspx
MSI elements (files, registry…) are connected to components.
Those components themselves are connected to features.
Hence, to customize a MSI with a MST (adding files, registry, shortcuts…):
- Create a new feature
- Create a component
- Create a link between the component and the feature
- Add elements (such as file or registry) to the component
.
.
2. Creating Features
MSDN source:
http://msdn.microsoft.com/en-us/library/aa368585.aspx
Tables > Feature > Add Row
.
.
Feature
Name of the feature. Max 38 characters
Feature_Parent
Optional key of a parent record in the same table
Title
Short string of text that identifies the feature. Can be the same as the name of the feature
Display
Specifies the order in which the feature is to be displayed in the user interface.
Level
Set it to 1. An install level of 0 (zero) disables the feature and prevents it from being displayed
Attributes (generally 0x0000)
0x0000 : Components not marked for installation from source are installed locally.
0x0001 : Components not marked for local installation are installed from source CD-ROM or server.
0x0002 : The state of the feature is the same as the state of the feature’s parent.
0x0004 : Set this attribute and the feature state is Advertise.
0x0008 : Set this attribute to prevent the feature from being advertised.
0x0010 : The user interface does not display an option to change the feature state to Absent.
0x0020 : Advertising is disabled if the OS does not support Windows Installer descriptors
.
.
3. Creating Components
MSDN source:
http://msdn.microsoft.com/en-us/library/aa368007.aspx
Tables > Component > Add Row
.
Component
Name of the component
ComponentId
To generate with the button displayed
Directory_
Generally INSTALLDIR
Attributes (generally 0x0002)
0x0000 : Component cannot be run from source
0x0001 : Component can only be run from source
0x0002 : Component can run locally or from source
0x0004 : The value in the KeyPath column is used as a key into the Registry table
0x0008 : The installer increments the count in the shared DLL registry of the component’s key file
0x0010 : The installer does not remove the component during an uninstall
0x0020 : The value in the KeyPath column is a key into the ODBCDataSource table
0x0040 : The installer reevaluates the value of the statement in the Condition column upon a reinstall
0x0080 : No install or reinstall if a key path file or registry entry for the component already exists
0x0100 : Mark it as a 64-bit component
0x0200 : Disable Registry Reflection on all existing and new registry keys affected by this component
0x0400 : In a patch package, allows to prevent leaving orphan components on the computer
0x0800 : If a component is marked with this attribute value in at least one package installed on the system, the installer treats the component as marked in all packages.
.
.
4. Associating Features and Components
MSDN source:
http://msdn.microsoft.com/en-us/library/aa368579.aspx
Tables > FeatureComponents > Add Row
.
Feature
Name of the new feature created
Component
Name of the new to component to associate to the feature
.
.
5. Importing REG Files
To import registry with .reg files in a package, proceed as follow:
- Create a new component
- Associate that component to a feature (create a new feature if needed)
- Components > Selection of the new component > Right-click > Import .reg file
.
.
6. Creating Directories
MSDN source:
http://msdn.microsoft.com/en-us/library/aa368295.aspx
Tables > Directory > Add Row
.
Directory
Unique identifier
Directory_Parent
Directory’s parent directory
DefaultDir
Name of the directory
Creating a directory does not mean creating a folder.
If a file is added to the directory, the folder will automatically be created.
Else, to create an empty folder, the CreateFolder table must be used.
.
.
7. Adding Files
To add a file in a package, proceed as follow:
- Create a new component
- The directory of the component must be the folder where the file has to be copied
- Associate that component to a feature (create a new feature if needed)
Tables > File > Add Row
.
- Check the source_path column
- Create the arborescence (For example: Program Files\TechSmith\Snagit 10)
- Copy the file in the folder