450 likes | 693 Views
Dry Run Notes…. Lots of content – some still needs to be cut Working with App-V folks on request to include developer messaging in this deck Final demo still in-progress. PC42. Deploying Your Application with Windows Installer (MSI) and ClickOnce . Tyler Robinson Lead Program Manager
E N D
Dry Run Notes… • Lots of content – some still needs to be cut • Working with App-V folks on request to include developer messaging in this deck • Final demo still in-progress
PC42 Deploying Your Application with Windows Installer (MSI) and ClickOnce Tyler Robinson Lead Program Manager Microsoft Corporation
Agenda • Improving today’s application deployment experience • Windows Installer (MSI) 4.5 • ClickOnce in .NET Framework 3.5 SP1 • Improving tomorrow’s application deployment experience • Windows Installer 5.0 in Windows 7 • Per-User Applications in Windows 7 • Q & A
Application Deployment Today • Deploying client applications is becoming more complex • Larger applications • Multiple packages • Complex dependencies • Difficult to patch • All of this makes for a bad user experience…
Application Deployment Today Long installation times Multiple UAC prompts Files left over after a failed install or uninstall Unnecessary add/remove programs control panel entries
Improving Today's Experience • Windows Installer 4.5 • Single transaction for multiple packages • Multiple-package logic handled from within MSI package • More robust patching • ClickOnce in .NET Framework 3.5 SP1 • Reduced size and install time for .NET Framework • Customizable user experience for installing ClickOnce pre-requisites
Windows Installer Version 4.5
Windows Installer 4.5 • Enables packaging and patching agility • Down-level redistributable and SDK • Available on the Microsoft Download Center • All new features and behaviors are opt-in • Reduce application compatibility impact • Popular authoring tools already support it • InstallShield • InstallAware • WiX
Multiple Package Transaction External ChainerTransaction Install Install Install Failure Product A Product B Product A Product B Failure Uninstall Rollback Rollback
Multiple Package Transaction • UAC credential prompt: Per-transaction versus Per-package • Reboot Handling • Transaction boundary • Multi-package PFR handling • Files in use handling • Transaction owner semantics • Transaction can be embedded in MSI package
Multiple Package Transaction • How to use it • Windows Installer 4.5 must be present on the machine • Use new MsiBeginTransaction to start the transaction • Call any number of MsiInstallProduct(or patch) • Use new MsiEndTransactionto commit the transaction
Demo Adopting Windows Installer 4.5 Multiple Package Transaction
Windows Installer Embedded UI • Built-in Windows Installer UI is limited • There has always been the ability to write a custom external UI handler, but it… • Is difficult to write • Increases deployment complexity • Does not work for all scenarios • New single-transaction features required a way to control transaction logic from within an MSI package
Windows Installer Embedded UI • New ability to include an embedded UI DLL in your package • Can do all the work that an external setup.exe would do • Allows custom hooks in operations like uninstall and repair • Not restricted to just UI • Eg: Can manage transaction logic as well
Windows Installer Embedded UI • How to use it • Windows Installer 4.5 must be present on the machine • Create an embedded UI DLL that exports the InitializeEmbeddedUI, EmbeddedUIHandler, and ShutdownEmbeddedUI functions • Use the MsiEmbeddedUI table to specify your DLL
Windows Installer Patching Improvements Requirement: Ability to keep the highest version of a shared component when a patch to it is uninstalled Design Change: Windows Installer patch uninstall behavior should consider the global machine state instead of just the product state Install Word Install Outlook Apply a patch to Word Uninstall the patch to Word Word Word Outlook Word Outlook Word Patch Word Outlook Updates Spell Checker to v12.0 Updates Spell Checker to v12.6 Installs Spell Checker v12.0 Installs Spell Checker v12.5
Windows Installer Patching Improvements Install Word Install Outlook Apply a patch to Word Uninstall the patch to Word Word Word Word Outlook Updates Spell Checker to v12.5 Updates Spell Checker to v12.6 Installs Spell Checker v12.0 Installs Spell Checker v12.5 Outlook Word Patch Spell Checker 12.6 Spell Checker 12.5 Spell Checker 12.5 Spell Checker 12.0 MSI Datastore Word Outlook’s cache Word’s cache Outlook Spell Checker 12.0 Spell Checker 12.5
Windows Installer Patching Improvements • Additional improvements include support for custom actions that run during patch uninstallation • How to take advantage of it • Opt-in to the new shared component uninstall behavior by setting the msidbComponentAttributesShared attribute on your componenet • Patch uninstall custom actions can be created by marking the msidbCustomActionTypePatchUninstall attribute
Deploying Windows Installer 4.5 • Windows Installer 4.5 redistributable is available for… • Windows XP SP2 and SP3 and XP 64-bit Editions • Windows Server 2003 SP2 • Windows Vista RTM and SP1 • Windows Server 2008 • Provided as .EXE on XP and Server 2003 systems and .MSU on Vista and Server 2008 systems • MSI.DLL version numbers are slightly different on various platforms • 4.5.6000.20817 on Windows Vista RTM • 4.5.6001.22162 on Windows Vista SP1 and Server 2008 • 4.5.6001.22159 on Windows XP and Server 2003
ClickOnce .NET Framework 3.5 SP1
Deploying ClickOnce Applications • ClickOnce applications have dependencies too • .NET Framework • 3rd party dependencies • No seamless way to integrate .NET FX + dependencies + application
Deploying ClickOnce Applications Click install … Install the .NET Framework… Install other prerequisites… Install the application…
Deploying ClickOnce Applications • Typical .NET FX Packaging is large and difficult to manage installation experience • .NET FX 3.5 SP1 Installer ~40-200 MB • Developers need a smaller Framework that will fit the needs of a Client platform • New .NET Client Profile • Subset of assemblies contained in .NET Framework 3.5 SP1 • .NET Framework Client ~27 MB • Lightweight bootstrapper • Reduce user clicks • Fast installation
.NET Client Profile Deployment Scenarios .NET Client Profile Bootstrapper will detect what versions of the .NET Framework are installed and update the computer accordingly Client Install = .NET Client redistributables will be installed Full Install = .NET Framework 3.5 SP1 full installation
Development For .NET Client • Development for .NET Client supported on all Visual Studio 2008 editions • Project Property that allows application to target the Client Framework • Targeting the Client Frameworks configure the VS Build system to warn users about their use of Assemblies not included in the client • Adds an Application Configuration file to the project that will allow the runtime to allow Client application to run on the Client
Client Profile Configuration Designer • Designer Tool that will allow developers to customize the deployment experience of their applications • Uses the Client Profile general purpose bootstrapper to deploy your application and all its prerequisites. • Can be used to deploy applications requiring the Client Profile or full .NET Framework 3.5 SP1
Demo Deploying a ClickOnce application created with the Client Profile Configuration Designer
Additional ClickOnce Improvements • Support for 3rd party web browsers • Relaxed signing requirements • Deployment of Office Add-Ins • Visual Studio Tools for Office • Associate file types to ClickOnce application
In Summary … • All the technologies you have just heard about are available today • Windows Installer 4.5 and .NET Framework 3.5 SP1 are available from the Microsoft Download Center • The .NET Client Profile Configuration Designer is in beta and available from <insert link> • Popular authoring tools such as InstallShield and Visual Studio support these features • Developers should consider taking advantage of these new releases to improve their end-user experience
Windows 7 Windows Installer 5.0 andPer-User Applications
Application Deployment In Windows 7 • No major breaking changes • If your installation works on Vista it should work on Windows 7 • Windows Installer 4.5 and .NET Framework SP1 features are in the box • Faster and easier deployment with fewer dependencies • Performance improvements • Expect to see 10 – 20% reduction in install operation times for larger applications • Greater application deployment flexibility • Windows Installer 5.0 with per-user application support
Windows Installer 5.0 • Improved UAC experience • Proper UAC dialog on uninstall for signed apps • Better performance and reliability • Reduce need for Custom Actions • Improve current support for LockPermissionsand ServiceInstall • Add new support for Print Button and Hyperlink controls • Support “offline” inventory • Applications installed to a WIM can now be inventoried and have patch applicability checks • Enable “per-user” application support…
Challenges With Per-User Deployment Today • Developers lack cohesive guidelines for creating a Per-User deployment package • Incomplete OS support • No pre-defined file location to install Per-User applications • OS Extension points not guaranteed to be per-user • Developers can not create a single package that installs both per-user and per-machine • Wrapper to include both Per-User package and per machine package in same deployment • As a result limited availability of Per-User applications
Benefits Of Per-user Deployment On Windows 7 With Windows Installer • Customer experience is consistent for Per-User and Per-Machine install • Customer chooses the type of installation • Same Windows Installer package for both • Additional and consistent OS extension points • Already supported OS Registration documented on MSDNFor Example: COM, File Associations • Additional Windows Shell Registrations enabled with Per-User support in Windows 7 • AppPaths • Preview Handlers • AutoPlay Handler
Considering Per-User deployment • Per-User applications do not support some important OS extension points • Set Program Access & Computer Defaults (SPAD) • Default Programs • Additionally… • Any machine-wide prerequisites must be installed separately • Your package can not install services or drivers • Your application can not have a core purpose to serve all users of the computer, such as anti-virus • Patching can only be done when the user is logged-on • Per-User deployment is only available on Windows 7
Building A Per-User MSI Package • Identify Package as per-user capable by setting the AllusersProperty = 2, and Msiinstallperuserproperty = 1 • Specify files to be written to a re-directable folder (Impact is contained within the user’s profile) • Specify private dynamic application state data in application’s data folder • Specify Registry keys as re-directable registry keys or HKCU (ie: root key in Registry Table is -1, 0 or 1) • Use only per-user capable registrations and custom actions
Demo Using InstallShield to create a Per-User Windows Installer Package
Take Aways … • You can use Windows Installer 4.5 and ClickOnce in .NET Framework 3.5 SP1 to help improve application deployment experiences today! • Windows 7 provides additional “out of the box” improvements for application deployment • Improved performance and reliability • Many dependencies are in the box • Minimal application compatibility impact • Per-User application deployments on Windows 7 can be used for an easier and safer end-user experience
Additional Resources • Windows Installer Team Blog • http://blogs.msdn.com/windows_installer_team • Windows Installer Start Page on MSDN • http://msdn.microsoft.com/en-us/library/aa372866.aspx • Windows Installer 4.5 Redistributable • http://go.microsoft.com/fwlink/?LinkID=120486 • Windows Installer 4.5 SDK • http://go.microsoft.com/fwlink/?LinkID=120527 • ClickOnce Documentation on MSDN • http://msdn.microsoft.com/en-us/library/t71a733d.aspx • Client Profile Configuration Designer (Beta)
Evals & Recordings Please fill out your evaluation for this session at: This session will be available as a recording at: www.microsoftpdc.com
Q&A Please use the microphones provided
© 2008 Microsoft Corporation. All rights reserved. Microsoft, Windows, Windows Vista and other product names are or may be registered trademarks and/or trademarks in the U.S. and/or other countries. The information herein is for informational purposes only and represents the current view of Microsoft Corporation as of the date of this presentation. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information provided after the date of this presentation. MICROSOFT MAKES NO WARRANTIES, EXPRESS, IMPLIED OR STATUTORY, AS TO THE INFORMATION IN THIS PRESENTATION.