Categories
FAQ Microsoft Windows Installer, Application Compatibility and Deployments

Windows Installer FAQ – Part 3

As you guys are aware, I am writing a series of posts which covers some key discussions, topics and FAQs in the stream of application packaging. In this third post, we will look at some questions on key OS components and Installation sequences.

Q11. What is the difference between a Task, Process and a Service  
A process is an instance of a computer program, consisting of one or more threads, that is being sequentially executed by a computer system that has the ability to run several computer programs concurrently. A task is “an execution path through address space”. In other words, a set of program instructions that are loaded in memory.
Windows service is a long-running executable that performs specific functions and which is designed not to require user intervention. (Thanks to Wiki for the answers)

Q12. How do you determine the installer Version in a machine

Option 1: In a command window, type msiexec, the window displayed will tell you the version number.

Windows Installer Version - Detection Method 1

 

 

Option 2: Check the file attributes of Msi.dll in the folder C:\Windows\System32

Windows Installer Version - Detection Method 2

 

Q13. Explain Advertising Phenomenon / On Demand Installation  
The availability of an application to a user without actually installing the application is called Advertisement, In this technique, only the interfaces required for loading and launching the applications are presented to the User. Windows Installer does not install the necessary components until a user or application attempts to activate the advertised program. This is usually done by launching the advertised shortcut. This concept is called install-on-demand.

There are 2 types of Advertisment, “Publish” and “Assign”.
Publish – In this type, the application’s advertising entry point will be visible for the user (usually a shortcut) – Generally used.
Assign – In this type, the application will be available only in Add remove program. The application is installed from here. (this option is used for only advanced users (or) when the application size is huge and they do not want a normal user to install it accidently by launching the shortcut, when he doenst need it)

An application can be tested for advertisement by using the /j switch. (/ju and /jm for user and machine respectively)
For eg: msiexec /jm ABC10.msi /qb

Q14. What are the various Installation sequences? / What are the differences between execute immediate and deferred? / When do you choose a CA to be written in Deferred?  
The various installation sequences are listed below.,
User Interface: The User Interface sequence, which is executed at the beginning of installation, gathers system information, displays dialogs to the end user, and records end user choices. It is suppressed during silent installations.
Execute Immediate: In this mode the installer creates an internal script and run then to make some system changes.
Execute Deferred: It encompasses all the actions between InstallInitialize and InstallFinalize.

 

Difference Between Execute Immediate and Deferred

Q15. What is the difference between the AdminUser and Privileged properties?
The AdminUser property is set when the user performing the installation is an administrator; the Privileged property is set when the user is allowed to install with elevated privileges. A user can install with elevated privileges if the user is an administrator, both the per-user and per-machine AlwaysInstallElevated policies are set or the application has been assigned by the system administrator.

If the user is an administrator, then both the AdminUser and Privileged properties are set. If the user is not an administrator, then AdminUser is never set. In that case, privileged is only set if the user has been given permission by the administrator through assignment or policy to install the application as elevated. In many cases, it is recommended that launch conditions or similar conditions use Privileged instead of AdminUser to allow for installation of applications assigned by administrators.

I would recommend, You read the other parts too – Part 1 , Part 2 , Part 3 , Part 4, Part 5 (Coming Soon)

Categories
Windows Installer, Application Compatibility and Deployments

How to Fix Custom Action Issues in MSI Installation?

When an installation fails, it may be because of the Custom Action(s) it contains. Here’s how to examine the MSI logs to troubleshoot the problem. Generate the MSI log and search for RETURN VALUE 3. This will help you identify and solve the problem in some cases.

Further, the possible Return Values for CAs are:

Value Description
0 Action not invoked; most likely does not exist.
1 Completed actions successfully.
2 User terminated prematurely.
3 Unrecoverable error occurred.
4 Sequence suspended, to be resumed later.

Also note that there is an MSI verbose log parsing tool (wilogutl.exe) in the Windows Installer PSDK that is also very useful in locating errors inside verbose log files. This tool is more thorough in identifying errors — just browse to the log file, wait for it to parse the whole log and then read the output it produces.

Categories
Best Practices Windows Installer, Application Compatibility and Deployments

MSI Package Validation using ORCA

ORCA provides a graphical interface to the package validation functionality available as part of the MSI SDK and in several third-party tools. Validation can flag many common problems in MSI packages by analyzing package data for invalid cells or combinations of cells that are not consistent.

Validation is performed by one or more Internal Consistency Evaluators, that are organized into CUB files. Several standard validators and CUB files are provided as part of the Platform SDK. ORCA can also use custom validators and CUB files.

Choosing a CUB File

You can select a CUB file for use during the validation run in three ways:

Select a CUB file from the drop-down list.
The list contains all CUB files registered on the system for use in validation.
Type a full path to the CUB file in the edit control.
Click the “Browse” button and locate a CUB file.
The default value for validation can be changed by choosing Options… from the Tools menu and changing the Default ICE File value on the Validation tab.

Selecting ICEs to Run

You can limit the set of ICE validators that run from a particular CUB file by changing the value in the ICEs to Run field of the validation dialog.

The set of validators to run can be specified in two ways:

Specifying no value selects the default set of ICEs from the CUB file.
A set of individual ICEs can be selected by specifying the ICE names, separated by a colon character (‘:’). The set of ICEs available depends on the CUB file selected.
The default value for this field can be changed by choosing Options… from the Tools menu and changing the ICEs to Run value on the Validation tab.
Running Validation

To run validation, click the Go button. ORCA executes the specified validators in the selected CUB file, validating the current database, including any changes to the database that have not been saved.

Filtering Information Messages

To not place information messages from the validators in the list of results, uncheck the Show “INFO” Messages option. This option can be toggled while validation is running, in which case, it affects messages generated from that time on but not messages that have already been generated.

Warning and information messages can be filtered by default by selecting the appropriate options in the Tools\Options configuration dialog box on the Validation tab.

Placing Results on the Clipboard

To copy the results of a validation run to the clipboard for pasting in another application, click the Copy Results button.

Using the Validation Pane

When the validation dialog box is closed, all warnings and errors in the validation window are copied to the validation pane at the bottom of the ORCA window. To show or hide the validation pane, choose Validation Pane from the View menu. Hiding the validation pane does not erase the contents.

To jump to the location of an error, select the error by clicking on it or using the arrow keys in the window to move to the desired error. The table list and table view immediately jump to the exact location of the error that was reported by the validator.

If a table or row that contains an error is deleted, any validation errors associated with that row are deleted from the validation pane.

The data in the validation pane is replaced each time the database is validated.

Examining Table and Cell Errors

To examine the errors associated with a specific cell, right-click on the cell and choose Errors…. The error information associated with the cell appears in a small dialog. If more than one error is associated with the cell, you can click the Previous and Next buttons to switch between the different errors.

To examine the errors associated with a table but not a specific cell, right-click on the table name in the table list and choose Errors…. The error information associated with the table appears in a small dialog. If more than one error is associated with the table you can click the Previous and Next buttons to switch between the different errors.

The information presented in the Errors dialog box is the same information available in the validation pane.

If a table does not exist in the database but contains a validation warning or error (such warnings and errors usually indicate that the table or a value within the table is required but not present), a Shadow Table appears in the table list. This table is used to provide access to the validation errors or warnings associated with the table, but does not indicate the presence of the table in the database. When a shadow table is selected, the table view pane that normally displays the contents of the table does not contain any table information and indicates that the table does not exist in the database.

If there are no errors associated with the cell or table, the Errors… option is disabled.

Cancelling Validation

To cancel the validation, press the Cancel button. No additional validators run and a cancel request is sent to the currently running validator. Some ICE validators acknowledge the cancel request and stop immediately. Other validators run to completion before accepting the cancel request.