Enhanced Service Configuration with Windows Installer 5.0

In Windows 7, Windows Installer provides enhanced native support for setup authors to configure services as part of an application install.

Starting with Windows Vista, Windows provides a powerful set of configuration options to configure services. These enhancements result in better security, performance and reliability for services. For example, the least privilege and resource isolation principles for services address security related issues by minimizing the vulnerabilities in a system. At the same time, delayed auto-start helps system startup performance by speeding up system boot time. Similarly, preshutdown notification for a service and improved failure detection and recovery options increase system reliability and a better end user experience.

MsiServiceConfig table provides options for configuring a service that is being installed or one that already exists on the machine by specifying the type of configuration as well as the parameters needed for that configuration. MsiServiceConfigFailureActions table is used to document failure actions that need to be invoked in the event of a service failure. This change takes effect the next time the system is started. Both these tables will be processed during the MsiConfigureServices action. The MsiConfigureServices standard action should be scheduled in the following order:

1. StopServices – From ServiceControl table

2. DeleteServices – From ServiceControl table

3. InstallServices – From ServiceInstall table

4. MsiConfigureServices – From MsiServiceConfig and MsiServiceConfigFailureActions tables

5. StartServices – From ServiceControl table

 

Q: Can I configure a service already installed on the system with this table?

A: Yes, as long as the corresponding component is being acted upon (installed/uninstalled/re-installed), you can configure an existing service. This is similar to stopping an already existing service via the StopServices standard action. Make sure the user has the privilege to configure services.

Q: When will the changed configuration take effect?

A: Generally the configuration options take effect when the service is restarted. An option like delayed auto-start will be manifested when the system restarts.

 

Q: Will this change the behavior of packages not using the new tables or the new standard action?

A: No, all existing tables and standard actions retain their current semantics. Packages not using the new standard action or the new tables will continue to work as earlier.

Q: My product has already been released. Can I use this feature to configure my services via a patch?

A: Yes, service configuration can be done via a patch. However, a patch that includes either of these two tables will be marked as not uninstallable.

Q: What happens if MsiConfigureServices action encounters an error?

A: The installation fails if MsiConfigureServices standard action fails. So, be extra careful while authoring these tables and ensure that the user has privileges to configure services if the package is not blessed by an administrator.

Q: Will this standard action work on down-level platforms?

A: No, as of now, the standard action MsiConfigureServices is introduced only in Windows 7.

Q: Will there be an ICE validation test to help me author these new tables?

A: Yes, ICE 102 is introduced to validate the two new tables.

[Author: Ashish Awasthi]
This posting is provided "AS IS" with no warranties, and confers no rights. Use of included script samples are subject to the terms specified at https://www.microsoft.com/info/cpyright.htm.


Comments

  • Anonymous
    March 04, 2009
    PingBack from http://www.anith.com/?p=15611

  • Anonymous
    April 22, 2009
    Are these service configuration features available downlevel on XP with MSI 4.5?