Contents Overview 1 Introduction to Deploying Custom Team Using the Windows Installer Service 4 Using Visual Studio Installer 10 Manipulating the Target Computer Registry 23 Contro
Trang 1Contents
Overview 1
Introduction to Deploying Custom Team
Using the Windows Installer Service 4
Using Visual Studio Installer 10
Manipulating the Target Computer
Registry 23
Controlling the Run-Time User Interface 30
Lab A: Deploying a Custom Team Folder
Template 35
Review 39
Module 4: Deploying Custom Team Folder Templates
Trang 2to represent any real individual, company, product, or event, unless otherwise noted Complying with all applicable copyright laws is the responsibility of the user No part of this document may
be reproduced or transmitted in any form or by any means, electronic or mechanical, for any purpose, without the express written permission of Microsoft Corporation If, however, your only means of access is electronic, permission to print one copy is hereby granted
Microsoft may have patents, patent applications, trademarks, copyrights, or other intellectual property rights covering subject matter in this document Except as expressly provided in any written license agreement from Microsoft, the furnishing of this document does not give you any license to these patents, trademarks, copyrights, or other intellectual property
2000 Microsoft Corporation All rights reserved
Microsoft, ActiveX, BackOffice, FrontPage, MSDN, MS-DOS, Outlook, PowerPoint, Visual Basic, Visual C++, Visual InterDev, Visual J++, Visual Studio, Windows, and Windows NT are either registered trademarks or trademarks of Microsoft Corporation in the U.S.A and/or other countries/regions
Other product and company names mentioned herein may be the trademarks of their respective owners
Project Advisor: Anne Bockman (Excell Data Corporation)
Project Lead and Instructional Designer: Josh Barnhill (Volt Technical)
Lead Program Manager: Colleena Carr
Technical Contributor: Chris Lodwig
Graphic Artist: Andrea Heuston (Artitudes Layout and Design)
Editing Manager: Lynette Skinner
Editor: Tom Blood (Volt Technical)
Copy Editor: Kaarin Dolliver (S&T Consulting)
Online Program Manager: Debbi Conger
Online Publications Manager: Arlo Emerson (Aditi)
Online Support: David Myka (S&T Consulting)
Multimedia Development: Kelly Renner (Entex)
Testing Leads: Sid Benavente, Keith Cotton
Testing Developer: Greg Stemp (S&T OnSite)
Production Support: Ed Casper (S&T Consulting)
Manufacturing Manager: Rick Terek (S&T OnSite)
Manufacturing Support: Laura King (S&T OnSite)
Lead Product Manager, Development Services: Bo Galford
Lead Product Manager: Janet Wilson
Group Product Manager: Robert Stewart
Trang 3Instructor Notes: Deploying Custom Team Folder
Templates
This module provides students with the ability to deploy custom Team Folder
Templates
At the end of this module, students will be able to:
Describe how to deploy a custom Team Folder Template
Describe the benefits, capabilities, and requirements of using the Microsoft®
Windows® Installer Service
Describe the benefits, capabilities, and requirements of using Microsoft Visual Studio® Installer
Manipulate registry settings on the target computer to support the installation of a Team Folder Template
Build an installer package (.msi) file by using Visual Studio Installer
Materials and Preparation
This section provides you with the materials and preparation needed to teach this module
Materials
To teach this module, you need the following materials:
Microsoft PowerPoint® file 2018a.ppt
Module 4, “Deploying Custom Team Folder Templates.”
Preparation
To prepare for this module, you should:
Read all of the materials for this module
Complete the lab
Presentation:
45 Minutes
Lab:
30 Minutes
Trang 4Module Strategy
Use the following strategy to present this module:
Introduction to Deploying Custom Team Folder Templates Provide an overview of how to deploy a Team Folder Template by using the Windows Installer Service and Visual Studio Installer
Using the Windows Installer Service List and describe the benefits of using the Windows Installer Service List and describe the elements of an installer package (.msi) file Describe the standard installation features available when using the Windows Installer Service List and describe the four tools available for creating custom installer packages
Using Visual Studio Installer Introduce Visual Studio Installer Explain the concept of Installer packages Describe the functions of components, files, and folders in an installer package (.msi) file Describe the relationship between an Installer package and an installer project Explain how to add folders and files to an installer project
Manipulating the Target Computer Registry Explain how to add and delete registry keys and values on the target computer Describe how to set registry values on the target computer
Controlling the Run-Time User Interface Explain how to build and run an installer package file
Trang 5Overview
Templates
At the end of this module, you will be able to:
Describe how to deploy a custom Team Folder Template
Describe the benefits, capabilities, and requirements of using Microsoft®
Windows® Installer Service
Describe the benefits, capabilities, and requirements of using Microsoft Visual Studio® Installer
Manipulate registry settings on the target computer to support the installation of a Team Folder Template
Build an installer package (.msi) file by using Visual Studio Installer
Describe methods for controlling the run-time User Interface (UI)
In this module, you will learn
about deploying custom
Team Folder Templates
Trang 6Introduction to Deploying Custom Team Folder
Templates
Administrator’s Computer
Team Leader’s Computer
wizard
Team Folders Wizard
Visual Studio Installer
Windows Installer Service
Team Folder Template
.HTM CSS
After you have created and tested a custom Team Folder Template on a development computer, you must deploy the template to its users–team leaders within your organization In turn, these team leaders use the Team Folders Wizard to create and deploy team folder applications to team members
Tools for Deploying Custom Team Folder Templates
You use two tools for deploying custom Team Folder Templates:
Windows Installer Service Service used to provide consistent deployment
of Team Folder Templates It also enables administrators and users to manage shared resources, customize installation processes, make decisions about how applications will be used, and resolve configuration problems
Visual Studio Installer Graphical tool used to author the installer package
(.msi) file It also simplifies the creation of application setup programs that are distributed to single-user or enterprise-wide desktops
Registering Custom Templates on the Target Computer
After installing the template on the team leader’s computer, you must register the template so the Team Folders Wizard can use it to create a team folder application Use the Windows Installer Service and the Visual Studio Installer
to register your template
Slide Objective
To outline the process of
deploying custom Team
Folder Templates
Lead-in
Team Folder Templates are
stored as several
components within a file
system folder and the
WebView folder
Trang 7Location of Installed Components
When installed, the template is contained within a file system folder All components of the template are stored in that particular file system folder except for any Web pages and supporting Web files These supporting files include cascading style sheets (.css) files and graphics (.htm) files that are both displayed on the Web pages These graphics files must be stored in a subfolder named WebView
Trang 8Using the Windows Installer Service
This section explains the benefits of the Windows Installer Service, the contents
of an installer package (.msi) file, the standard installation features, and the tools available for creating installer packages
For additional information about the Windows Installer Service, please see “Chapter 3: Using the Windows Installer Service” of the Microsoft
Mastering Series Online course Building Solutions for Microsoft Windows 2000
with Visual Basic The course is available on the Web at
http://msdn.microsoft.com/training/offers/winvbo_bld/main.htm
Slide Objective
To outline this topic
Lead-in
In this section, you will learn
about using the Windows
Installer Service for
deploying applications
Note
Trang 9Benefits of the Windows Installer Service
Administrator’s Computer
Windows Installer Service
rules consistently
components of an application will be needed later
problems at application run time
The Windows Installer Service helps you deliver a reliable and manageable
“Certified for Windows” installation package for your solutions A Microsoft Windows® installer package (.msi) file is a storage file containing the instructions and data required to install an application The Windows Installer Service performs standard installation and uninstallation tasks such as copying files, modifying registry settings, creating desktop shortcuts, and, when appropriate, displaying dialog boxes to query the user for installation preferences
Rather than shipping each application with its own installation project file, user interface, and other components, a software vendor provides an installer package in the form of a single msi file The Microsoft Installer package (.msi) file contains data that identifies the application components, and reports the state these components must be in for the application to install The Windows Installer Service processes this data to install the application and then to repair configuration problems at run time
The Windows Installer Service offers the following benefits:
Manages shared resources
Enforces the same set of installation rules consistently
Provides ease of customization
Helps administrators decide which components of an application will be needed later
Diagnoses and repairs configuration problems at application run time
Slide Objective
To list the benefits of the
Windows Installer Service
Lead-in
The Windows Installer
Service manages shared
resources, enforces the
same set of installation rules
consistently, provides ease
of customization, helps
administrators decide which
pieces of an application will
be needed later, and
diagnoses and repairs
configuration problems at
application run time
Trang 10Installer Package (.msi) File Contents
Product
The top-level element of an installer package (.msi) file is a product Each (.msi) file contains only one product The product contained in the msi file is assigned a Globally Unique Identifier (GUID) that is used to uniquely identify that product to the Windows Installer Service
Features
Users can typically turn on or off features during a custom installation The Windows Installer Service supports a hierarchy of features A feature is a collection of one or more components that other features may also include
Components
A component is the smallest installation unit for the Windows Installer Service
A component can be a collection of resources such as files, registry keys, shortcuts, or initialization (.ini) file entries Components are commonly hidden from the user Whenever a user selects a feature for installation, the Windows Installer Service determines which components are required A component does not necessarily have to contain any files It might contain only registry entries When a component contains one or more files, all files are installed into the same folder
Slide Objective
To list the components of an
installer package (.msi) file
Lead-in
All applications are viewed
by the Windows Installer
Service as three logical
building blocks: products,
features, and components
Trang 11Standard Installation Features
Installation Enables the installation of an entire product or a particular product feature.Enables the installation of an entire product or a particular product feature.
Uninstallation Uninstalls any product it previously
installed
Uninstalls any product it previously installed
Installation on demand
Installation on demand
Gives users access to product functionality
in the absence of the actual application files
Gives users access to product functionality
in the absence of the actual application files
The Windows Installer Service was designed to improve user productivity, lower total cost of ownership, and resolve other installation-related issues by providing the features described in the following table
Feature Description
Installation The Windows Installer Service enables the installation of
an entire product, or installation of a particular product feature and any components required to implement that feature
Uninstallation The Windows Installer Service reliably uninstalls any
product it previously installed The Windows Installer Service uninstalls a product by removing all associated registry entries and application files, except for files shared by some other installed programs
Installation on Demand Installation on demand gives users access to application
functionality in the absence of the actual application files
Though desktop icons and entries on the Start menu give
the appearance that the applications are installed, the application files are not actually copied and installed on the computer until the user tries using the application for the first time
Slide Objective
To list and describe the
standard features provided
by the Windows Installer
Service
Lead-in
The Windows Installer
Service provides these
features: installation,
uninstallation, and
installation on demand
Trang 12Tools for Creating Installer Packages
After you have completed your development efforts, you must create a way to package and distribute your product to team leaders You need to create a Microsoft Windows installer package (.msi) file
You can use a variety of tools to author the msi file for your applications
Visual Studio Installer
The Microsoft Visual Studio Installer is a feature of Microsoft Visual Studio that allows administrators to create installation projects based on the Windows Installer technology The Visual Studio Installer is an authoring tool for creating Windows installer package (.msi) files This authoring tool is designed
to allow the administrator to create simple setups, while allowing complete control of the setup This installer is fully integrated into the shell of Visual Studio 6.0
This course assumes you are using Visual Studio Installer
Wise for Windows Installer
Wise for Windows Installer is a product of Wise Solutions, Inc Wise for Windows Installer is a complete installation toolkit designed specifically to build installation product features that comply with “Certified for Windows” requirements Wise for Windows is powerful, flexible, easy to use, and contains
an excellent combination of features and capabilities
For more information about Wise for Windows Installer, go to the Web site at www.wisesolutions.com
Slide Objective
To list the available tools for
creating installer package
(.msi) files
Lead-in
Windows Installer Service is
compatible with four tools
for creating installer
package (.msi) files
Note
Trang 13InstallShield for Windows Installer
InstallShield for Windows Installer is a product of InstallShield Software Corporation The InstallShield is also designed to support the Microsoft Windows Installer Service This service creates Installer Package (.msi) files and enables an application to comply with “Certified for Windows”
VERITAS WinINSTALL is independent of network operating systems and protocols You can create distribution packages for migrations, corporate standard applications, updates, or patches
For more information about VERITAS WinINSTALL, go to the Web site at www.veritas.com
Note
Note
Trang 14Using Visual Studio Installer
Visual Studio Installer is a tool that you can use to build and package the msi files After it is built and packaged, the msi file can be distributed to single or enterprise-wide users With Visual Studio Installer, you can take advantage of all of the benefits provided with the Windows Installer Service, while working
in the Microsoft development environment
The following topics introduce the Visual Studio Installer, explain the concept
of Installer projects, describe the functions of components, files, and folders in
an installer package (.msi) file, and explain how to add folders to an Installer project
For additional information about the Visual Studio Installer, please see
“Visual Studio Installer Documentation” on the Microsoft Developers Network Web site The documentation is available at
http://msdn.microsoft.com/library/devprods/vs6/vstudio/vsinstal/veovrvisualstudioinstalleroverview.htm
Slide Objective
To outline this topic
Lead-in
You use Visual Studio
Installer to build and
package Windows Installer
Service–based setup files
Note
Trang 15Introducing Visual Studio Installer
Saves time and effort in authoring application installers
Gives you power and control in designing application installations
Visual Studio Installer is a tool for authoring Windows Installer package (.msi) files within the Microsoft Development Environment With Visual Studio Installer, you can use features of the Windows Installer Service
Simplifying the Authoring Process
Visual Studio Installer saves you time and effort in authoring msi files by providing:
Seamless integration in the Visual Studio shell
Customizable Installer project templates
Graphical editors for file placement, user interface (UI) customization, registry entries, and file associations
Enhancing the Authoring Process
In addition to simplifying the msi file authoring process, Visual Studio Installer also gives you the capability to customize and configure, and also to plan every aspect of the installer package Specifically, you can:
Quickly and easily construct installer projects that contain outputs from more than one Visual Studio product For example, your installer project can include Microsoft Visual Basic®, Microsoft Visual C++®, and Microsoft Visual J++® outputs (.exe and dll files)
Create and configure components to install on the target computers
Manipulate the target computer registry
Create file associations
Specify where to place files and folders on the target computers
Create desktop and start menu shortcuts
Slide Objective
To list the benefits of using
Visual Studio Installer for
authoring installer package
(.msi) files
Lead-in
Visual Studio Installer
simplifies and enhances the
process of creating
application installers
Trang 16Distribute your installer package (.msi) file with all other installation information as uncompressed or compressed cabinet (.cab) files, depending
on the distribution requirements and capabilities of the source and target computers
Distribute your msi file on a number of different media, such as floppy disks and CD-ROMs
Include Windows merge modules (.msm files) in installer projects This is the correct way to include shared code in an Installer package (.msi) file You can also use Visual Studio Installer to create your own merge modules for code you want to share among msi files
Trang 17Visual Studio Analyzer Projects Existing Recent
Create a Windows Installer project to which files can be added.
Name: ExternalContacts Location: c:\moc\2018a\labfiles\lab04
Empty Installer Empty Merge
Module Visual BasicInstaller
Types of Installer Package Files
In most cases, you can create the installer project and establish the Installer package with special templates in one easy step Then you can customize your installer package (.msi) file as desired With Visual Studio Installer, you can create two types of package files:
A Self-Installing Installer Package (.msi) File Contains all information
necessary for the application installation You use this type of package file
to deploy custom Team Folder Templates
A Redistributable Merge Module (.msm file) The correct method for sharing
files and components among installer packages That is, your Visual Studio Installer project can package files or components that will be shared among application installers
Slide Objective
To show the New Project
dialog box, which enables
you to create three types of
Windows Installer projects
Lead-in
It is important to understand
the two types of installer
package (.msi) files, as well
as the three types of
templates for creating
installer projects
Trang 18Templates for Creating Installer Projects
Visual Studio Installer provides the following templates to help you create installer projects in one easy step:
Empty Installer Template To start an empty installer project to which you
will manually add all necessary elements Certain defaults are set for the installer project, but because the Empty Installer Template contains no project outputs, you must manually add any project outputs, files, and dependencies that you want the project to contain This template is useful if you want complete control over what is added to your installer project—that
is, if you do not want Visual Studio Installer to help you get started by importing files into the project You use this template to deploy custom Team Folder Templates
Empty Merge Module Template Creates an empty merge module (.msm
file) in which you can include files, resources, registry entries, and setup logic to install shared files Installer package (.msi) files incorporate msm files to correctly install shared files.
Microsoft Visual Basic Installer Template Starts your installer project by
importing a Visual Basic project you want to package and distribute The Visual Basic Installer Template provides a one-step Wizard for importing a Visual Basic project into your installer project This template adds the Visual Basic project outputs (the end results of other projects, such as exe files, ocx controls, dll libraries, and so on) and their dependencies to your installer project If any Visual Basic output file has explicit dependencies, the Visual Basic Installer template adds these dependencies to your installer project
Trang 19Installer Components, Files, and Folders
ExternalContacts – Microsoft Development Environment [design]
File Edit View Project Build Debug Tools Window Help Project Explorer - ExternalContacts
Solution ‘ExternalContacts’ (1 project) ExternalContacts
Target Machine File System User Interface Registry Associations Files
Ready
Visual Studio Installer makes it easy to build installer projects on the foundation of installer components Specifically, Visual Studio Installer:
Manages all installed files as component elements
Makes it easy to identify the component to which a file belongs
Provides visual component display and management
Visual Studio Installer Components, Files, and Folders
One way to create components in Visual Studio Installer is to add a file to your installer project Every file you add to an installer project is initially its own component This occurs because when you add a file to an installer project, Visual Studio Installer creates a component establishing the file you added as the key file Visual Studio Installer best practice recommendation is to make each file included in your installer project a component
To meet Windows Installer Service requirements, all files belonging to a component must be installed in the same directory on the target computer For example, if your localized components are stored in a localization directory (as they often are), the Windows Installer Service requires you to create localized components separate from their source components All files for the source component will be installed in one target computer directory, and all files for the localized component will be installed in a different target computer directory
Slide Objective
To present a view of the
components, files, and
folders of an installer project
within Microsoft Visual
InterDev
Lead-in
Visual Studio Installer
manages all installed files
as component elements,
making it easy to identify the
component to which a file
belongs, and providing
visual component display
and management
Trang 20Visual Studio Installer Component Identification
GUID strings uniquely identify components A sample GUID might be {880DE2F0-CDD8-11D1-A849-006097ABDE17} Visual Studio Installer automatically generates a unique GUID for every component
Visual Studio Installer also gives each component the name of its key file, so a unique key file identifies each component For example, if the Comp1.dll file is the key file for an installer component, the component’s name (for purposes of working within Visual Studio Installer) is also Comp1.dll This gives you a way
to identify and manage components without relying on its GUID
The key-file naming convention applies only within Visual Studio Installer and is provided simply for your convenience The true identifier of a component is its GUID
Visual Studio Installer Visual Component Management
The Visual Studio Installer File System Editor provides a limited visual display
of the files making up your application, the locations where the files will be installed on the target computers, and how the files are grouped into components
The File System Editor File and Component Display
The Visual Studio Installer File System Editor displays the file structure of installer components on target computers In the File System Editor, you can add files to the Installer project, create new installer components, and drag files among components
The File System Editor Folder Display
The Visual Studio Installer File System Editor displays the target computer’s folder (directory) and file structure In the File System Editor, you can create new folders on a target computer for components, and drag files and
components among target computer folders Visual Studio Installer provides this visual folder, file, and component management system, to help ensure that you meet the Windows Installer Service requirement that all files belonging to a component are installed in the same target computer folder
Important
Trang 21Creating and Opening an Installer Project
To use Microsoft Visual Studio Installer, first create or open a Windows Installer Project (.wip) file in your Visual Studio solution
Creating an Installer Project
To create a Visual Studio Installer project:
1 In Microsoft Visual InterDev®, on the File menu, click New Project
2 In the Visual Studio folder, click the Visual Studio Installer Projects folder
3 To create an empty installer project for a custom Team Folder Template,
double-click the Empty Installer icon
Visual Studio Installer creates your installer project The Project Explorer
displays your installer project hierarchy You can expand the Target
Machine node to start setting up the configuration of your installed product
Opening an Installer Project
To open a Visual Studio Installer project:
1 On the File menu, click Open Project
2 Click the Existing tab
3 In the Existing list, move to the Windows Installer Service project To open the project, select the installer project and then click Open
Trang 22Adding Folders to an Installer Project
ExtContactsTest1 – Microsoft Development Environment [design] – [ExtContactsTes…
File Edit View Project Build Debug Actions Tools Window Help
File System on Target Machine Application Folder Program Files Folder Microsoft Office Office TFWizard 1033 ExtContacts WebView User’s Desktop
User’s Start Menu Windows Folder
Ready
WebView extcontacts.pst template.ini Solution ‘ExternalContacts’ (1 project)
ExternalContacts Target Machine File System User Interface Registry Associations Files Name Project Explorer – ExternalContacts
With the File System Editor of Visual Studio Installer (from within Visual InterDev), you can specify the folder structure for your installed application on the target computer You can add three types of folders to your installer project:
Windows Special Folders This type of folder cannot be moved or renamed
Included are the following folders: Windows Folder, Windows System Folder, User’s Start Menu, Common Files Folder, User’s Desktop, User’s Favorites Folder, User's Application Data Folder, User’s Personal Data Folder, User’s Send-To Menu, User’s Template Folder, and Root Folder
Custom Special Folders You can create this type of folder, but you cannot
rename these folders
Arbitrary Folders You can create this type of folder, and you can move and
rename these folders
Slide Objective
To present a view of adding
folders to an installer project
from within Visual InterDev
Lead-in
You can add three types of
folders to Installer projects
by using the File System
Editor of Visual Studio
Installer