FAQ Microsoft Windows Installer, Application Compatibility and Deployments

Windows Installer FAQ – Part 4

instAs you guys are aware, I am writing a series of posts which covers some key discussions, topics and FAQs in the stream of MSI Windows Installer and application packaging. In this fourth part, we will look at some questions on MSI properties and key scenarios which can easily achieved by using the properties appropriately.

Q16. What are the types of properties and when do you use a Private property?

Properties are global variables that Windows Installer uses during an installation. As MSI is a database type structure, all the properties are saved in a table called PROPERTY table.  There are three types of properties.

PUBLIC: These properties can be changed by the Application packager in a transform / a system administrator can change it through the command line.  These are always in Capital Letters.  These properties are set during installation and it can be overridden in command line. Ex: INSTALLLEVEL, ALLUSERS, INSTALLDIR.

Properties that are set during the User interface dialogs should be public.

PRIVATE: These properties are used internally by the installer and their values must be entered into the database by the author of the installation package or set by the installer during the installation to values determined by the environment. For example, if the installation is run on a Windows platform, the installer sets the WindowsFolder property to the value specified in the Property table. These properties cannot be changed by the System administrator in command line and its always in lower cases. EX: WindowsFolder, SourceDir

RESTRICTED PUBLIC: There are certain conditions where SystemAdmin can exert control over the PUBLIC properties so that a user with an elevated privileges can’t modify or access them so as to maintain secure systems these properties are know as Restricted PUBLIC PROPERTIES. These properties has a limited set of values. For eg: ALLUSERS,REBOOT

The best practice is to set the ALLUSER property  =1 because if the application is to be installed to per machine and a user without admin access try to install that it will prompt an error but in the other cases it will be a peruser installation without any prompts.

Q17. What would you do, when you (do not) want your installer to restart the machine after installation?

The REBOOT property takes care of this.  The REBOOT property can have any of the below values.

REBOOT = Force – Always prompt for a computer restart at the end of the installation. The UI prompts the user to restart at the end. If there is no user interface, the system restarts at the end of the installation

REBOOT=Suppress – Suppress restart prompts at the end of the installation. During installation, Windows Installer prompts the user to restart whenever it encounters ForceReboot set by the application vendor

REBOOT=ReallySuppress – This will suppress all restart prompts that ForceReboot initiates during the installation and also suppress all restart prompts at the end of the installation.

Setting the REBOOTPROMPT property to Suppress (or S) allows Installer to perform a computer restart, if necessary, without prompting the user.

Q18. How can you disable/Hide an application from Add/Remove Programs?

Setting the ARPSYSTEMCOMPONENT property to 1 will hide the application from appearing. Also, ARPNOREMOVE property to 1, will just disable the remove button from Add/remove Programs.

Q19. When would you use REINSTALL property and what is its significance?

REINSTALL is an important property which is used while Application patching and Upgrades.  If you set the REINSTALL property, you must also set the REINSTALLMODE property, to indicate the type of reinstall you want.

When the REINSTALLMODE property is not set, all files currently installed are reinstalled, but only if the file on the computer is an earlier version or is not present. By default, no registry entries are rewritten if REINSTALL is set to ALL, only features already installed are reinstalled Thus, if REINSTALL is set for a product that is yet to be installed, no installation takes place.

 By default the REINSTALLMODE is “omus”.

For eg: Msiexec /p AdbeRdrUpd913_all_incr.msp REINSTALL=ALL REINSTALLMODE=omus

 p – Reinstalls a product only when a file is missing

  •  o – or an older version of a file is installed
  •  e – or an equal or older version of a file is installed
  •  d – or a different version of a file is installed
  •  c – or the stored checksum value doesn’t match the calculated value
  •  a – Forces all files to be reinstalled
  •  u – Rewrites all required user-specific registry entries
  •  m – Rewrites all required computer-specific registry entries
  •  s – Overwrites all existing shortcuts
  • v – This switch forces the installation to ignore the cached MSI package on the machine and recache the new package being run. This should only be used in an upgrade and not with a first-time installation.

Q20.  Which are the Properties that are mandatory for an MSI installation to work?

ProductCode; ProductLanguage; ProductVersion; ProductName;Manufacturer

For Information on ADDLOCAL property, check this article –

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

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)

FAQ Microsoft Windows Installer, Application Compatibility and Deployments

Windows Installer FAQ – Part 2

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 second post, we will look at some questions, which involve deployment privileges and types of Installations.

Q6. What is a MSI product made up of?
A package contains everything that the windows installer service needs to install a particular product. This includes the appropriate MSI files and any external files(such as CAB files) that the setup needs. Packages, too, are identified by GUIDs. If you make any change to a package, you must assign a new package code.

A feature is a piece of functionality that makes sense to the end user of the software. The help system could be a feature, or spell-checking, or wizards. If you have ever installed software that displays a tree view of things that you can choose to install or leave out, those are individual features. Features are identified by strings that must be unique within a particular package.

A component is a unit of software that the installer can install. Components can include files, registry keys, shortcuts, resources, and other things. Each component is identified by a GUID, the component ID, which must be unique across all packages, regardless of product.

Q7. What are the Different types of Privileges during the installations can be given?

• The users doesn’t have the full admin rights to install the application
• The users doesn’t have WRITE-ACCESS to the Program Files folder of their computers or to the HKEY_LOCAL_MACHINE registry location
• Installation can be done in this environment by the approval of the Administrator by means of GPO or Active directories, the administrator can assign or publish the application.
Elevated rights
• An account or process that is operating or logged into the computer that has full administrator rights or permissions.(User can install the application but doesn’t have rights to set Group policies ).
Administrative Rights
• Highest level of permissions that can be granted to an account in Windows NT User Manager. An administrator can set permissions for other users and create groups and accounts within the domain. These rights are required to install the System Files Update.

Q8. What are the Functions and capabilities MSI has?
These are the following functions which an MSI provides,
• Transactional Operations: For each operation that an MSI performs It can undo and rollback hence System will not contain unwanted FILES /Registries and will be more clean if uninstallation fails.
• Self Healing: MSI can detect common installation problems at launch, like missing Files and Registries and automatically repairs them.
• Install On Demand: It supports on demand installation of application features { like Spell Check in Words}
• Installation On Locked Down Environments (this is done using Elevated Privilages also)
• State Management: Windows installer provides a set of WiN32 API which allows querying the current state, verification of the existing state, repair of corrupted state and transition from one state to another.
• Consistent Installation Rules: Windows Installer uses consistent and reliable version rules, which provide consistent and reliable installations for all applications and prevent newer files from being overwritten by older files.

Q9. How advertised installation (on demand Installation) is different from a normal installation?
An advertisement installation places entry points, such as shortcuts, on the destination computer without actually installing the application. When an installation is opened in advertising mode, only the Execute sequences are run because it does not have a User Interface sequence, and therefore no dialogs appear
Command line /JU (User) and /JM (machine) is used for that.

Q10. Should users with user-level privileges be able to install MSI applications?
A user with user-level privileges can install managed applications if the system administrator has enabled the installation. Otherwise, the user will only be able to install MSI applications provided the user has permission to write files, create directories, and write registry keys in the locations where the installation typically writes those resources. If the user cannot write to a location, then the installer will only be able to write to that location if the administrator has given permission for the installer to do so.

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

FAQ Microsoft Windows Installer, Application Compatibility and Deployments

Windows Installer FAQ – Part 1

I am planning to write a series of posts covering some key discussions, topics and FAQs in the stream of application packaging. I reckon this post would help, when some of you look at a change in your careers or when stuck up with an issue. This would be my first post of the series. For few of the questions, I will post the answers as well. I would also post in questions, for which I do not know the answer. I would expect you guys to answer that for me 🙂

Well, I shall make a point clear, this is just an FAQ for Application Packagers. Please do use this FAQ ethically. Let me start from the Basics in this first Post.

Q1. What is Application Packaging and why is it needed?
Application packaging bundles applications and operating systems into a single file called a distribution unit (.msi), which makes it easier to deploy and install them on user’s computers. Packaging reduces the total cost of ownership for the customers by enabling them to efficiently install and configure the applications. This results in an application package, which provides the product with new capabilities like advertise features without installing them, installs products on demand, add user customizations etc. Read more on the Application Deployment and Compatibility tools here.

Q2. What process is generally followed while re-packaging applications?
These are the stages of the application packaging life-cycle:
1. Package request is received
2. Technical Evaluation of the Application Source is done.
3. Packaging
3.1 Capture
3.2 Editing
3.3 Testing
4. Quality Assurance (QA)
5. Deployment Testing (if Any)
6. User Acceptance Testing (UAT)

Q3. Why do we need Windows Installer Technology? How does it work?
Windows Installer is used to handle Application Installations on Windows Platform. Installer technology is made up of these three below elements which work together.
Windows Installer client – Any application that calls Windows Installer to perform a task (Example SMS distribution, Add Remove Program, Windows-based shell..etc. )
Windows Installer service – a System service “Msiexec.exe” for installing and managing applications.
Windows Installer package (an .msi file.) – A database file which is used to manage the various states of the application like adding, changing, or removing it from a computer.
A MSI file is a database, which contains information on which files/ registries needs to be installed. As its a database, the installer knows, what all gets into the machine. Hence, it takes care that, only the necessary components are removed while un-installation.

Q4. How does an MSi Install in a machine?
When an MSI is triggered for Installation, the msiexec service starts the installation and it follows these 3 phases.
Acquisition – In this phase, the MSI collects all the data and inputs from the user and generates the installation scripts. (When the user presses the cancel button, the installation rollbacks)
Execution – In this phase, the generated Installation script, gets executed and all the necessary files and registries are all set to get copied and the installation starts. (When the user presses the cancel button, the installation rollbacks)
Commit – In this phase, the MSI marks a footprint in the machine and goes towards a point of no-return. Means, in this phase, the installation cannot roll-back.

Q5. What are the advantages we get by packaging applications? / What are the advantages by using Windows Installer MSIs?
1. Customize Applications to suit the user needs.
2. Simplify the Installation and Un-installation Procedures.
3. Saves Time in both Installation and Un-installation.
4. Once packaged, applications can be quickly installed on a range of desktops in multiple locations, saving administrative costs, simplifying the licensing fees management and minimizing support and repair expenditures.
5. Saves Space of the product by doing apt modifications to applications.
6. Has a great flexibility of obtaining the lost files through a phenomenon called Self Heal, this reduces the down time of application. If a critical file (a .DLL or .EXE file, for example) that is part of the distribution is corrupt or is deleted, the user can be prompted to repair the installation by presenting the original .MSI distribution. Additionally, if the installation media is available (for example, on a network share), the repair simply happens automatically.
7. Can be advertised. So that on demand installation could take place.
8. Application upgrading can be done with ease
9. Clean installation and Un-Installation is achieved by a process called Roll-Back.
10. Simplifies management of new user set-up along with the revision and distribution of software repairs and new applications to existing users. Application recovery can also be improved.
11. Helps eliminate uncontrolled software downloads and installation, enables applications to be safely removed and reduces non-business traffic on a corporate network.
12. Using .MSI format, can automate software distribution process and ensure that the installation doesn’t break other applications that have already been installed.
13. Application is installed via an OS service.
14. State management is maintained. In the past, it’s been difficult to know whether an application is installed on a machine. You would have to query for a .DLL with a specific version number or determine whether an .EXE file with a specific name was present. Windows Installer provides an application programming interface (API) that lets programmers and administrators see whether a specific application is installed on a machine.
15. Scriptable API. This whips together a VBScript to help us with the MSI file manipulations. The API to manipulate MSI files is so powerful that it can create, validate and update packages, trigger installs and uninstalls, examine the MSI repository data on computers, and perform some custom actions.
16. Served installs. Because MSI files can be housed in a share point and delivered via a server, we can keep our installation files all in one place or move them around — closer to the users if necessary.

I would recommend, You read the other parts too – Part 1 , Part 2 , Part 3 , Part 4

General Microsoft Windows Installer, Application Compatibility and Deployments

Frequently Asked Questions About Windows Installer

Here’s a great reference if you want/need to learn some Windows Installer concepts and best practices. This document is very useful to individuals who are starting to do application packaging