33
Creating Manageable Creating Manageable Setups With The Windows Setups With The Windows ® ® Installer (Part 1 Of 2) Installer (Part 1 Of 2) Rob Collie, Program Manager Rob Collie, Program Manager Windows Installer Windows Installer Microsoft Corporation Microsoft Corporation Jim Masson, Program Manager Jim Masson, Program Manager Windows NT Administration Windows NT Administration Microsoft Corporation Microsoft Corporation

Creating Manageable Setups With The Windows ® Installer (Part 1 Of 2) Rob Collie, Program Manager Windows Installer Microsoft Corporation Jim Masson, Program

Embed Size (px)

Citation preview

Page 1: Creating Manageable Setups With The Windows ® Installer (Part 1 Of 2) Rob Collie, Program Manager Windows Installer Microsoft Corporation Jim Masson, Program

Creating Manageable Setups Creating Manageable Setups With The WindowsWith The Windows®® Installer Installer (Part 1 Of 2)(Part 1 Of 2)

Rob Collie, Program ManagerRob Collie, Program ManagerWindows InstallerWindows InstallerMicrosoft CorporationMicrosoft Corporation

Jim Masson, Program ManagerJim Masson, Program ManagerWindows NT AdministrationWindows NT AdministrationMicrosoft CorporationMicrosoft Corporation

Page 2: Creating Manageable Setups With The Windows ® Installer (Part 1 Of 2) Rob Collie, Program Manager Windows Installer Microsoft Corporation Jim Masson, Program

AgendaAgenda

Part 1Part 1 History and motivationHistory and motivation TechnologyTechnology

Package formatPackage format APIAPI OS integrationOS integration

ExamplesExamples

Part 2Part 2 Build a package for an applicationBuild a package for an application

Page 3: Creating Manageable Setups With The Windows ® Installer (Part 1 Of 2) Rob Collie, Program Manager Windows Installer Microsoft Corporation Jim Masson, Program

History And MotivationHistory And Motivation

Application installation is a high Application installation is a high TCO itemTCO item Deploying an application upgrade strikes Deploying an application upgrade strikes

fear into the heart of administratorsfear into the heart of administrators

Problems with existing Problems with existing installation technologiesinstallation technologies Poor user experiencePoor user experience Poor admin experiencePoor admin experience Destabilizing to the OS and other appsDestabilizing to the OS and other apps Poor development experiencePoor development experience

Page 4: Creating Manageable Setups With The Windows ® Installer (Part 1 Of 2) Rob Collie, Program Manager Windows Installer Microsoft Corporation Jim Masson, Program

Administrator Administrator Experience TodayExperience Today Setup is a black boxSetup is a black box

Administrators want to know what it Administrators want to know what it will do to themwill do to them

No easy way to determine the state No easy way to determine the state of a machineof a machine

Difficult to lockdown desktopsDifficult to lockdown desktops Broken uninstallBroken uninstall

Can only refcount filesCan only refcount files Cannot identify clients of resourcesCannot identify clients of resources

Page 5: Creating Manageable Setups With The Windows ® Installer (Part 1 Of 2) Rob Collie, Program Manager Windows Installer Microsoft Corporation Jim Masson, Program

Setup Development TodaySetup Development Today

Developing setup is often Developing setup is often an afterthoughtan afterthought

No notion of sharing setup logic No notion of sharing setup logic between developers or productsbetween developers or products

Difficult to update and maintainDifficult to update and maintain Script-based setupsScript-based setups

FragileFragile

Page 6: Creating Manageable Setups With The Windows ® Installer (Part 1 Of 2) Rob Collie, Program Manager Windows Installer Microsoft Corporation Jim Masson, Program

The Windows InstallerThe Windows Installer

The system manages application installationThe system manages application installation Provide consistent installation rulesProvide consistent installation rules Manage shared componentsManage shared components Enable dynamic configuration and repairEnable dynamic configuration and repair Windows 95, 98 and Windows NTWindows 95, 98 and Windows NT®® 4.0 4.0 Integrated with Windows NT 5.0 Integrated with Windows NT 5.0

management featuresmanagement features

Standard setup formatStandard setup format APIs so that applications can APIs so that applications can

configure themselvesconfigure themselves

Page 7: Creating Manageable Setups With The Windows ® Installer (Part 1 Of 2) Rob Collie, Program Manager Windows Installer Microsoft Corporation Jim Masson, Program

ArchitectureArchitecture

Installer Package Installer Package and filesand files

File SystemFile System RegistryRegistry

ApplicationsApplications

Shell, COM, Shell, COM, and App MGMT and App MGMT

ClientClient

Active Active DirectoryDirectory

Windows Installer APIWindows Installer API

Windows Installer Windows Installer serviceservice

ConfigConfigDataData

Configuration dataConfiguration data Tracks state of Tracks state of

installed appsinstalled apps

Service built into OSService built into OS Service on Windows NTService on Windows NT Performs all Performs all

install operationsinstall operations

APIAPI Install and configure packages Install and configure packages

and featuresand features Query machine stateQuery machine state Build packagesBuild packages

Package formatPackage format Describes required stateDescribes required state

Page 8: Creating Manageable Setups With The Windows ® Installer (Part 1 Of 2) Rob Collie, Program Manager Windows Installer Microsoft Corporation Jim Masson, Program

OS Resident Install ServiceOS Resident Install Service

Setup is built into Windows NT 5.0Setup is built into Windows NT 5.0 No more freelance setup.exe’sNo more freelance setup.exe’s Consistent installation rulesConsistent installation rules Also available for Windows 95/98 Also available for Windows 95/98

and Windows NT 4.0and Windows NT 4.0

TransactionalTransactional Each install session is a transactionEach install session is a transaction

system will rollback to previous state when system will rollback to previous state when there is a failurethere is a failure

Runs as a service on Windows NTRuns as a service on Windows NT Authorized apps can use elevated privileges Authorized apps can use elevated privileges

to installto install

Page 9: Creating Manageable Setups With The Windows ® Installer (Part 1 Of 2) Rob Collie, Program Manager Windows Installer Microsoft Corporation Jim Masson, Program

DemoDemo

Rollback of a failed upgradeRollback of a failed upgrade

Page 10: Creating Manageable Setups With The Windows ® Installer (Part 1 Of 2) Rob Collie, Program Manager Windows Installer Microsoft Corporation Jim Masson, Program

Features

Components

Shortcuts

Action

Files

Optional CAB

Summary Information Other Tables...

Pointers to source files

Windows Installer PackageWindows Installer Package

Custom database formatCustom database format Created by setup Created by setup

developerdeveloper One per productOne per product Described in Described in

relational tablesrelational tables

Products haveProducts have FeaturesFeatures ComponentsComponents Installable resources Installable resources Entry pointsEntry points

.MSI file extension.MSI file extension

Page 11: Creating Manageable Setups With The Windows ® Installer (Part 1 Of 2) Rob Collie, Program Manager Windows Installer Microsoft Corporation Jim Masson, Program

DemoDemo

Inside a Windows Installer packageInside a Windows Installer package

Page 12: Creating Manageable Setups With The Windows ® Installer (Part 1 Of 2) Rob Collie, Program Manager Windows Installer Microsoft Corporation Jim Masson, Program

Component 1Component 1(WordCore)(WordCore)

Component 3Component 3(ExcelCore)(ExcelCore)

Component 2Component 2(MS Speller)(MS Speller)

ProductProduct(Office)(Office)

Feature 2Feature 2(Excel)(Excel)

Feature 1Feature 1(Word)(Word)

Entry PointEntry Point(.doc)(.doc)

Entry PointEntry Point(Shortcut)(Shortcut)

Entry PointEntry Point(.xls)(.xls)

Entry PointEntry Point(Shortcut)(Shortcut)

Entry PointEntry Point(CLSID)(CLSID)

ResourceResource(Registry Key)(Registry Key)

ResourceResource(winword.exe)(winword.exe)

ResourceResource(Registry Key)(Registry Key)

ResourceResource(excel.exe)(excel.exe)

ResourceResource(Registry Key)(Registry Key)

ResourceResource(Mssp.dll)(Mssp.dll)

Feature 3Feature 3(Word Speller)(Word Speller)

Feature 4Feature 4(Excel Speller)(Excel Speller)

Features, Components, Features, Components, Resources, And Entry PointsResources, And Entry Points

Page 13: Creating Manageable Setups With The Windows ® Installer (Part 1 Of 2) Rob Collie, Program Manager Windows Installer Microsoft Corporation Jim Masson, Program

ComponentsComponents

Atomic unit of installationAtomic unit of installation Groups installable resourcesGroups installable resources Installed and removed as a unitInstalled and removed as a unit Shared and refcounted as a unitShared and refcounted as a unit Enables non-file refcountingEnables non-file refcounting Identified by a GUIDIdentified by a GUID

Resources aren’t shared across componentsResources aren’t shared across components Not exposed to userNot exposed to user Key pathKey path

Path returned from Installer API functionsPath returned from Installer API functions Usually a file, but can also be a registry keyUsually a file, but can also be a registry key

Page 14: Creating Manageable Setups With The Windows ® Installer (Part 1 Of 2) Rob Collie, Program Manager Windows Installer Microsoft Corporation Jim Masson, Program

Entry Points Entry Points

Describe “entry points” to applicationsDescribe “entry points” to applications ShortcutsShortcuts File extension serversFile extension servers CLSIDsCLSIDs Other COM and Shell dataOther COM and Shell data

Used to support install on demandUsed to support install on demand Used by Windows NT 5.0 assign and Used by Windows NT 5.0 assign and

publish operationspublish operations Tied to feature and componentTied to feature and component

Page 15: Creating Manageable Setups With The Windows ® Installer (Part 1 Of 2) Rob Collie, Program Manager Windows Installer Microsoft Corporation Jim Masson, Program

Features And Products Features And Products

Installer featuresInstaller features Grouping of components (and/or features)Grouping of components (and/or features)

Can share componentsCan share components Exposed to user - “checkbox” levelExposed to user - “checkbox” level Install states: Install states:

Local, Source, Absent, “As Needed”Local, Source, Absent, “As Needed”

Installer productsInstaller products Grouping of featuresGrouping of features One product = one .MSI fileOne product = one .MSI file Each product has a GUIDEach product has a GUID

Page 16: Creating Manageable Setups With The Windows ® Installer (Part 1 Of 2) Rob Collie, Program Manager Windows Installer Microsoft Corporation Jim Masson, Program

Windows Installer Windows Installer serviceservice

File SystemFile System RegistryRegistry

Windows Installer APIWindows Installer API

Installer package Installer package and filesand files

Windows ShellWindows Shell

Launches AppLaunches App

ConfigConfigDataData

Automatic Repair Inside Automatic Repair Inside The Resiliency DemoThe Resiliency Demo Shell opens MSI shortcutShell opens MSI shortcut

Uses descriptor forUses descriptor for Product, Feature, Product, Feature,

ComponentComponent Shell requests pathShell requests path

MsiProvideComponent()MsiProvideComponent() Installer queries systemInstaller queries system

Config dataConfig data Key filesKey files

Installs if requiredInstalls if required Use the package and source Use the package and source

files to install and repairfiles to install and repair Returns path to ShellReturns path to Shell Shell launches appShell launches app

Page 17: Creating Manageable Setups With The Windows ® Installer (Part 1 Of 2) Rob Collie, Program Manager Windows Installer Microsoft Corporation Jim Masson, Program

Package CustomizationPackage Customization Capture customizations to an Capture customizations to an

Installer packageInstaller package Saved to a transform fileSaved to a transform file Applied on the flyApplied on the fly Can use pristine sourceCan use pristine source

Multiple custom installs can Multiple custom installs can share install pointshare install point Office for accountants and Office for accountants and

Office for engineersOffice for engineers Customizations can be reusedCustomizations can be reused Customizations are deployed Customizations are deployed

with packageswith packages Windows NT 5.0, Systems Windows NT 5.0, Systems

Management Server, etc…Management Server, etc… Use tools to createUse tools to create

Office: custom Install WizardOffice: custom Install Wizard

Make changes and customizations to the package, then save

the transform

Transform

Original Package

Open original package read only using a

transform tool

CustomPackage

Administrator wants a custom package

Original Package

Transform CustomPackage

Transform is applied to original to generate the custom package on the fly

Page 18: Creating Manageable Setups With The Windows ® Installer (Part 1 Of 2) Rob Collie, Program Manager Windows Installer Microsoft Corporation Jim Masson, Program

Management APIManagement API

Applications can programmaticallyApplications can programmatically Install, configure, and repair products Install, configure, and repair products

and featuresand features Determine component locationsDetermine component locations

Installer manages all pathsInstaller manages all paths Ask Installer for paths at runtimeAsk Installer for paths at runtime Enables resiliency and roamingEnables resiliency and roaming Enables on-demand installEnables on-demand install

Documented in the platform SDKDocumented in the platform SDK msi.h and msiquery.hmsi.h and msiquery.h See MGMT 005 for all the detailsSee MGMT 005 for all the details

Page 19: Creating Manageable Setups With The Windows ® Installer (Part 1 Of 2) Rob Collie, Program Manager Windows Installer Microsoft Corporation Jim Masson, Program

Just In Time Install Just In Time Install

““Advertisement” of feature/productAdvertisement” of feature/product Make it appear installed, but postpone the actual Make it appear installed, but postpone the actual

install until the feature is usedinstall until the feature is used Place entry points on machinePlace entry points on machine

Feature - application installs when neededFeature - application installs when needed Menu choice and toolbar buttonMenu choice and toolbar button

Product - OS installs when neededProduct - OS installs when needed ShortcutsShortcuts File associationsFile associations COM registrationCOM registration

Uses token instead of pathsUses token instead of paths Opaque representation of product, Opaque representation of product,

feature, componentfeature, component

Page 20: Creating Manageable Setups With The Windows ® Installer (Part 1 Of 2) Rob Collie, Program Manager Windows Installer Microsoft Corporation Jim Masson, Program

AdvertisingAdvertising

Feature example: file converterFeature example: file converter Installed first time it’s usedInstalled first time it’s used Requires app to call APIRequires app to call API No more “do I need this?”No more “do I need this?”

MGMT 005 has all the detailsMGMT 005 has all the details

Product example: assigned applicationProduct example: assigned application Top-level featuresTop-level features Requires OS support (Shell and COM)Requires OS support (Shell and COM)

Page 21: Creating Manageable Setups With The Windows ® Installer (Part 1 Of 2) Rob Collie, Program Manager Windows Installer Microsoft Corporation Jim Masson, Program

Leveraged By WindowsLeveraged By Windows

Windows 95, 98 and Windows NT 4.0Windows 95, 98 and Windows NT 4.0 Shell shortcuts and file extension activation Shell shortcuts and file extension activation

support automatic repairsupport automatic repair Requires enhanced shellRequires enhanced shell

Internet Explorer 4.01 SP 1 with enhanced shellInternet Explorer 4.01 SP 1 with enhanced shell

Windows NT 5.0Windows NT 5.0 Shell and COM are Windows Installer awareShell and COM are Windows Installer aware

Automatic repairAutomatic repair Just in time installJust in time install Install based on group policyInstall based on group policy

Page 22: Creating Manageable Setups With The Windows ® Installer (Part 1 Of 2) Rob Collie, Program Manager Windows Installer Microsoft Corporation Jim Masson, Program

Windows NT 5.0 Windows NT 5.0 Software InstallationSoftware Installation Advertise entry points into Active DirectoryAdvertise entry points into Active Directory Deployment typesDeployment types

AssignAssign Place entry points on desktop automaticallyPlace entry points on desktop automatically

PublishPublish Just in time installJust in time install Choose from Add/Remove programsChoose from Add/Remove programs

Example - published applicationExample - published application Discussed in preconferenceDiscussed in preconference

Page 23: Creating Manageable Setups With The Windows ® Installer (Part 1 Of 2) Rob Collie, Program Manager Windows Installer Microsoft Corporation Jim Masson, Program

3. No file 3. No file association association entry foundentry found

1. Person 1. Person activates doc activates doc

to opento open

2. Look for file association in 2. Look for file association in local registrylocal registry

Policy Integration (1 Of 3)Policy Integration (1 Of 3)Opening a new document todayOpening a new document today

Page 24: Creating Manageable Setups With The Windows ® Installer (Part 1 Of 2) Rob Collie, Program Manager Windows Installer Microsoft Corporation Jim Masson, Program

DemoDemo

Installing an application from Installing an application from the Active Directorythe Active Directory

Page 25: Creating Manageable Setups With The Windows ® Installer (Part 1 Of 2) Rob Collie, Program Manager Windows Installer Microsoft Corporation Jim Masson, Program

1. Admin1. Adminpublishespublishes

applicationapplication

Policy Integration (2 Of 3)Policy Integration (2 Of 3)Opening a new document with Opening a new document with Windows NT 5.0Windows NT 5.0

Active Active DirectoryDirectory

2. Application Deployment Editor advertises2. Application Deployment Editor advertisesapplication in Active Directoryapplication in Active Directory

4. Person4. Personopens docopens doc

3. Person3. Personlogs in to NTlogs in to NT

5. Shell looks for file association 5. Shell looks for file association in local registryin local registry

Page 26: Creating Manageable Setups With The Windows ® Installer (Part 1 Of 2) Rob Collie, Program Manager Windows Installer Microsoft Corporation Jim Masson, Program

Policy Integration (3 Of 3) Policy Integration (3 Of 3) Opening a new document with Windows NT 5.0Opening a new document with Windows NT 5.0

WindowsWindowsInstallerInstaller

8. Windows 8. Windows Installer installs Installer installs

the app, then the app, then the app opens the app opens

the docthe doc

Active Active DirectoryDirectory

6. Look for file 6. Look for file association in association in

directorydirectory

Application Application File ServerFile Server

7. Open7. Openpackagepackage

PackagePackage

4. Person4. Personopens docopens doc

5. Look for file association in 5. Look for file association in local registrylocal registry

Page 27: Creating Manageable Setups With The Windows ® Installer (Part 1 Of 2) Rob Collie, Program Manager Windows Installer Microsoft Corporation Jim Masson, Program

Creating Installer PackagesCreating Installer Packages

Obtain an authoring toolObtain an authoring tool Setup toolkit vendorSetup toolkit vendor ““Rainier” release of VisualStudioRainier” release of VisualStudio®®

Plan your feature and Plan your feature and component breakdowncomponent breakdown

Using the Installer is a big step towards Using the Installer is a big step towards manageable applicationsmanageable applications See MGMT 001See MGMT 001

Part 2 of this talk focuses on Part 2 of this talk focuses on creating packagescreating packages

Page 28: Creating Manageable Setups With The Windows ® Installer (Part 1 Of 2) Rob Collie, Program Manager Windows Installer Microsoft Corporation Jim Masson, Program

Windows Installer TimelineWindows Installer Timeline

In beta nowIn beta now Windows NT 5.0Windows NT 5.0 Office 2000Office 2000 Third-party toolsThird-party tools

In platform SDK todayIn platform SDK today Release planRelease plan

Goal: 11/1/98Goal: 11/1/98 Version 1.0 of SDKVersion 1.0 of SDK Version for all supported platformsVersion for all supported platforms

Will ship with Office 2000Will ship with Office 2000 Will ship with Windows NT 5.0Will ship with Windows NT 5.0

Page 29: Creating Manageable Setups With The Windows ® Installer (Part 1 Of 2) Rob Collie, Program Manager Windows Installer Microsoft Corporation Jim Masson, Program

Some Installer ToolsSome Installer Tools

InstallShieldInstallShield http://www.http://www.installshieldinstallshield.com/iszaw/.com/iszaw/

Seagate Software WinInstallSeagate Software WinInstall http://www.seagatesoftware.com/newtechnologyhttp://www.seagatesoftware.com/newtechnology

Wise SolutionsWise Solutions http://www.wisesolutions.com/msieditor/http://www.wisesolutions.com/msieditor/

Page 30: Creating Manageable Setups With The Windows ® Installer (Part 1 Of 2) Rob Collie, Program Manager Windows Installer Microsoft Corporation Jim Masson, Program

Next StepsNext Steps

Stick around for Part 2!Stick around for Part 2! We will build a Windows Installer package We will build a Windows Installer package

for a small applicationfor a small application Walk through the process step by stepWalk through the process step by step

Also see MGMT 005Also see MGMT 005 Empower your application using Empower your application using

Installer APIsInstaller APIs

Page 31: Creating Manageable Setups With The Windows ® Installer (Part 1 Of 2) Rob Collie, Program Manager Windows Installer Microsoft Corporation Jim Masson, Program

Call To ActionCall To Action

Empower your applications to be managed!Empower your applications to be managed! Separate user and machine dataSeparate user and machine data

See MGMT 001See MGMT 001 Policy enable your applicationPolicy enable your application

See MGMT 001, MGMT 006See MGMT 001, MGMT 006 Create a Windows Installer packageCreate a Windows Installer package

See MGMT 003, MGMT 004See MGMT 003, MGMT 004 Leverage the Windows Installer APILeverage the Windows Installer API

See MGMT 005See MGMT 005 Leverage Active Directory for Application DataLeverage Active Directory for Application Data

See DS 05, DS 06See DS 05, DS 06

Page 32: Creating Manageable Setups With The Windows ® Installer (Part 1 Of 2) Rob Collie, Program Manager Windows Installer Microsoft Corporation Jim Masson, Program

Windows NT 5.0 LogoWindows NT 5.0 Logo

Leverage your investment in Leverage your investment in Windows InstallerWindows Installer Install/uninstall is top concern among customersInstall/uninstall is top concern among customers 1 of 4 key areas of the 1 of 4 key areas of the newnew Windows NT 5.0 logo Windows NT 5.0 logo

Follow up infoFollow up info Draft requirements: Draft requirements:

On the conference DVDOn the conference DVD www.microsoft.com/windows/winlogo/developerwww.microsoft.com/windows/winlogo/developer

Feedback: [email protected] by 11/15Feedback: [email protected] by 11/15

Page 33: Creating Manageable Setups With The Windows ® Installer (Part 1 Of 2) Rob Collie, Program Manager Windows Installer Microsoft Corporation Jim Masson, Program