Installation Requirements. Agenda Installation requirements Installation options Installing to...

34
Installation Installation Requirements Requirements

Transcript of Installation Requirements. Agenda Installation requirements Installation options Installing to...

Page 1: Installation Requirements. Agenda Installation requirements Installation options Installing to correct folder locations Installing Windows resources Creating.

Installation RequirementsInstallation Requirements

Page 2: Installation Requirements. Agenda Installation requirements Installation options Installing to correct folder locations Installing Windows resources Creating.

Agenda• Installation requirements• Installation options• Installing to correct folder locations • Installing Windows resources• Creating custom actions• Supporting command-line installation• Following component rules• Installation test cases

Page 3: Installation Requirements. Agenda Installation requirements Installation options Installing to correct folder locations Installing Windows resources Creating.

Installation Requirements• Use Windows components for installation• Support User Account Control for

installation• Install to correct folders• Sign ClickOnce manifests• Keep ClickOnce installations isolated• Correctly configure package identity• Install Windows resources properly• Follow best practices for creating custom

actions• Avoid reboots during installation• Support command-line installation• Follow component rules

Lea Galanter
I was confused in the first sentence about why it says "Windows Installer (MSI), when the name of the product has previously been identified as Microsoft Software Installer? I just checked the Windows Server SG, and it indicates NOT to use MSI except as part of a named component, e.g., the MsiSetInternalUI function, and to use "Windows Installer" instead. Can you please change throughout this presentation to comply with these style guidelines?
Page 4: Installation Requirements. Agenda Installation requirements Installation options Installing to correct folder locations Installing Windows resources Creating.

Agenda• Installation requirements• Installation options• Installing to correct folder locations • Installing Windows resources• Creating custom actions• Supporting command line installation• Following component rules• Installation test cases

Page 5: Installation Requirements. Agenda Installation requirements Installation options Installing to correct folder locations Installing Windows resources Creating.

Installation Options

• Applications must use Windows Installer (MSI) or ClickOnce for installation– Follows good setup design– Are safer– Evolves with operating system– Preferred by enterprise customers

Page 6: Installation Requirements. Agenda Installation requirements Installation options Installing to correct folder locations Installing Windows resources Creating.

Windows Installer 4.0

• Efficient installation and configuration

• Mature and proven technology• Reduces TCO• Better corporate deployment• No need to create Windows Vista–

specific packages• Meets most installation requirements

Page 7: Installation Requirements. Agenda Installation requirements Installation options Installing to correct folder locations Installing Windows resources Creating.

Supporting UAC for Installation

• Installation requires privileges• Installer must have an embedded

manifest• User must provide approval• Installer detects setup programs• Windows Installer engine

automatically enables and follows UAC

Page 8: Installation Requirements. Agenda Installation requirements Installation options Installing to correct folder locations Installing Windows resources Creating.

Configuring Package Identity• Correct identification in Software

Explorer• Supply all required information by

using Windows Installer properties– ProductName– Manufacturer– ProductVersion

• Application upgrade properties– UpgradeCode– ProductCode– ProductVersion– ProductLanguage

Page 9: Installation Requirements. Agenda Installation requirements Installation options Installing to correct folder locations Installing Windows resources Creating.

Restart Manager

• Check if files that require updating are in use

• Shut down applications, apply the update, restart

• Applications listen to shutdown messages, and save state without prompting user

• Applications restart as if they were never shut down

• If system restart is unavoidable, schedule to minimize disruption

Page 10: Installation Requirements. Agenda Installation requirements Installation options Installing to correct folder locations Installing Windows resources Creating.

Using Restart Manager

• Windows Installer 4.0 automatically uses Restart Manager

• Files-in-use dialog boxes• ForceReboot action should not be

used• Custom actions call Restart Manager

APIs

Page 11: Installation Requirements. Agenda Installation requirements Installation options Installing to correct folder locations Installing Windows resources Creating.

Uninstalling Applications

• Windows Installer follows clean uninstall logic– All nonshared application files and folders– Shared application files with refcount=0– Unshared registry entries– Start menu shortcuts created on installation– Option to remove user data

• Reinstall without errors• Windows Installer supports rollback if

installation fails

Page 12: Installation Requirements. Agenda Installation requirements Installation options Installing to correct folder locations Installing Windows resources Creating.

ClickOnce

• Simplified installation• Visual Studio support • Low impact• Media choices• Install or run cached• Automatically check for updates

Page 13: Installation Requirements. Agenda Installation requirements Installation options Installing to correct folder locations Installing Windows resources Creating.

Signing ClickOnce Manifests

• Protect applications from tampering• Use Authenticode signature

– Makecert.exe • Also need a Software Publishing Certificate

– Certificate Authority• Sign the application

• Test the signature

cert2spc yourkey.cer yourkey.spc

signcode -v <path>yourkey.pvk -spc <path>yourkey.spc filename.exe

ckhtrust filename.exe

Page 14: Installation Requirements. Agenda Installation requirements Installation options Installing to correct folder locations Installing Windows resources Creating.

Isolating ClickOnce Installations

• Store data only in user folders• Document registry keys• Designed to have minimal impact

Page 15: Installation Requirements. Agenda Installation requirements Installation options Installing to correct folder locations Installing Windows resources Creating.

Windows Installer 4.0 Windows Installer 4.0 and ClickOnceand ClickOnce

Page 16: Installation Requirements. Agenda Installation requirements Installation options Installing to correct folder locations Installing Windows resources Creating.

Agenda• Installation requirements• Installation options• Installing to correct folder locations • Installing Windows resources• Creating custom actions• Supporting command-line installation• Following component rules• Installation test cases

Page 17: Installation Requirements. Agenda Installation requirements Installation options Installing to correct folder locations Installing Windows resources Creating.

Installing to Correct Folder Locations

• Applications installed to Program Files or AppData

• User data written at first run• Users given location flexibility• Managing shared components• New folder hierarchy

Page 18: Installation Requirements. Agenda Installation requirements Installation options Installing to correct folder locations Installing Windows resources Creating.

User Profile NamespaceUser Profile Namespace

Page 19: Installation Requirements. Agenda Installation requirements Installation options Installing to correct folder locations Installing Windows resources Creating.

Agenda• Installation requirements• Installation options• Installing to correct folder locations • Installing Windows resources• Creating custom actions• Supporting command-line installation• Following component rules• Installation test cases

Christina Palaia
A different font size is used for Agenda slide text throughout module...
Page 20: Installation Requirements. Agenda Installation requirements Installation options Installing to correct folder locations Installing Windows resources Creating.

Installing Windows Resources

• Applications must not install WRP files

• Update using Microsoft Service Pack• Never repackage system

components

Page 21: Installation Requirements. Agenda Installation requirements Installation options Installing to correct folder locations Installing Windows resources Creating.

Agenda• Installation requirements• Installation options• Installing to correct folder locations • Installing Windows resources• Creating custom actions• Supporting command-line installation• Following component rules• Installation test cases

Page 22: Installation Requirements. Agenda Installation requirements Installation options Installing to correct folder locations Installing Windows resources Creating.

Creating Custom Actions

• Document behavior• No nested install• Do not add columns to standard tables• Cannot call gacutil• Record outcome in log• Do not prefix tables or properties with

“msi”• Actions changing system state written as a

deferred and rollback pair

Page 23: Installation Requirements. Agenda Installation requirements Installation options Installing to correct folder locations Installing Windows resources Creating.

Agenda• Installation requirements• Installation options• Installing to correct folder locations • Installing Windows resources• Creating custom actions• Supporting command-line installation• Following component rules• Installation test cases

Page 24: Installation Requirements. Agenda Installation requirements Installation options Installing to correct folder locations Installing Windows resources Creating.

Supporting Command-Line Installation

• Enable deployment by SMS• Successfully install in quiet mode• Document command-line options

Page 25: Installation Requirements. Agenda Installation requirements Installation options Installing to correct folder locations Installing Windows resources Creating.

Agenda• Installation requirements• Installation options• Installing to correct folder locations • Installing Windows resources• Creating custom actions• Supporting command-line installation• Following component rules• Installation test cases

Page 26: Installation Requirements. Agenda Installation requirements Installation options Installing to correct folder locations Installing Windows resources Creating.

Following Component Rules

• Installing or removing one application should not harm another

• Enable Windows Installer to remove application correctly

• At most one COM server per component

• At most one target for Start menu or desktop shortcut

• ComponentId field not null

Page 27: Installation Requirements. Agenda Installation requirements Installation options Installing to correct folder locations Installing Windows resources Creating.

Agenda• Installation requirements• Installation options• Installing to correct folder locations • Installing Windows resources• Creating custom actions• Supporting command-line installation• Following component rules• Installation test cases

Page 28: Installation Requirements. Agenda Installation requirements Installation options Installing to correct folder locations Installing Windows resources Creating.

Installation Test Cases (1)

• Verify application installer uses Windows Installer

• Verify application’s MSI installer does not receive any errors from the Internal Consistency Evaluators

• Verify application’s installer contains an embedded manifest

• Verify application launches with installed user token

• Verify application installs to the correct folders by default

Page 29: Installation Requirements. Agenda Installation requirements Installation options Installing to correct folder locations Installing Windows resources Creating.

Installation Test Cases (2)• Verify ClickOnce application is signed with

a valid Authenticode certificate• Verify ClickOnce application stores data

only in installed user’s folders• Verify Windows Installer package contains

ProductName, Manufacturer, ProductVersion (major and minor), UpgradeCode, ProductCode, and ProductLanguage property tags and that they are not null

Page 30: Installation Requirements. Agenda Installation requirements Installation options Installing to correct folder locations Installing Windows resources Creating.

Installation Test Cases (3)

• Verify application does not try to write to or replace any WRP registry keys or files

• Verify the application does not use nested install custom actions

• Verify the application does not add custom columns to the Windows Installer standard tables and that any custom tables or properties are not prefixed with “msi”

Page 31: Installation Requirements. Agenda Installation requirements Installation options Installing to correct folder locations Installing Windows resources Creating.

Installation Test Cases (4)

• Verify the application rolls back the install and restores machine to previous state

• Verify the application does not force a restart during install

• Verify the application properly handles files in use during install

• Verify the application can be installed quietly from the command line

Page 32: Installation Requirements. Agenda Installation requirements Installation options Installing to correct folder locations Installing Windows resources Creating.

Installation Test Cases (5)

• Verify the application’s Windows Installer ComponentID table does not contain null values

• Verify the application’s Windows Installer package does not contain more than one COM server for each component

• Verify the application’s Windows Installer package does not contain more than one shortcut for each component

Page 33: Installation Requirements. Agenda Installation requirements Installation options Installing to correct folder locations Installing Windows resources Creating.

Summary• Installation requirements• Installation options• Installing to correct folder locations • Installing Windows resources• Creating custom actions• Supporting command line installation• Following component rules• Installation test cases