Wise for Windows Installer, Version 6.0 Copyright ©1994-2004 Wise Solutions, Inc. All Rights Reserved. This documentation and the accompanying software are copyrighted materials. Making unauthorized copies is prohibited by law. No part of the software or documentation may be reproduced, transmitted, transcribed, stored in a retrieval system or translated into any human or computer language without prior written permission of Wise Solutions, Inc. Wise Solutions, Inc.
Contents 1 Welcome . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 Documentation Roadmap . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 Getting Help and Product Support . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 Getting Updates Over the Web . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 2 Basics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Creating and Editing Installation Templates. . . . . . . . . . . Component Rules . . . . . . . . . . . . . . . . . . . . . . . . . . . . About Component Rules . . . . . . . . . . . . . . . . . . . . . Selecting a Component Rule Set . . . . . . . . . . . . . . . Using Component Rules to Align GUIDs in an Upgrade Customizing Component Rules . . . . . . . . . . . . . . . . . Microsoft Best Practices Component Rule Set. . . . . . . One File Per Component Rule Set . . . . . . . . . . . . . . . 4 . . . . . . .
Configuring a Feature Using the Feature Using Conditions With Features . . . . . . Adding and Deleting Feature Conditions Managing Binary Resources . . . . . . . . . . . Adding Binary Resources . . . . . . . . . . . Refreshing Binary Resources . . . . . . . . 6 Details Dialog . ........... ........... ........... ........... ........... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
7 Your Installation on the Destination Computer . . . . . . . . . . . . . 166 About System Requirements . . . . . . . . . . . . . . . . . . . . . . . . Setting a Requirement on the System Requirements Page Setting a Requirement by Creating a Launch Condition . . . Performing a System Search . . . . . . . . . . . . . . . . . . . . . . . . Searching For Files or Directories . . . . . . . . . . . . . . . . . . Searching For Items in .INI Files . . . . . . . . . . . . . . . . . .
Setting Installation Options for a Web Installation . . . . . . . . . . . . Setting Details for Web Sites, Virtual Directories, and Web Folders. Configuring a Microsoft SQL Server During Installation. . . . . . . . . . . . Tips on Using the SQL Server Scripts Page . . . . . . . . . . . . . . . . . Setting SQL Connection Strings . . . . . . . . . . . . . . . . . . . . . . . . . Specifying SQL Statements . . . . . . . . . . . . . . . . . . . . . . . . . . . . Specifying Replacements in SQL Statements . . . .
Keeping Track of Changed Text Strings . . . . . . . . . . . . . . . . . . . . . . . . . . . 274 What Pre-Translated Languages Are Available? . . . . . . . . . . . . . . . . . . . . . . . . 276 Language IDs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 277 12 Distributing an Installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 279 Package Distribution . . . . . . . . . . . . . . . . . . . . . . . . .
Changing Source Directories . . . . . . . . . . . . . . . . . . . . . . Converting to Relative Source File Paths . . . . . . . . . . . . . . Converting to UNC-Based Source File Paths. . . . . . . . . . . . Changing the Source Directory Dynamically During Compile . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 325 . 326 . 327 . 327 15 Merge Modules and Transforms . . . . . . . . . . . . . . . . . . . . . . . . . 329 About Merge Modules . . . . . . . . .
Isolating a .DLL With an .EXE . . . . . Adding Published Components . . . . . Tables Tab. . . . . . . . . . . . . . . . . . . . . . Creating a New Table . . . . . . . . . . . Creating a New Row in a Table. . . . . Editing Existing Tables . . . . . . . . . . Searching for Table Data . . . . . . . . . Finding Validation Errors . . . . . . . . . Editing Binary Data in the Icon Table About Wise Tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
20 OLE Automation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 453 About OLE Automation . . . . . . . . . . . . . . . About Macro Files . . . . . . . . . . . . . . . . . . Creating, Editing, and Running a Macro. Events That Can Trigger a Macro . . . . . About the Macro Editor Window. . . . . . . . . OLE Automation Function Reference. . . . . . AddComPlusApp . . . . . . . . . . . . . . . . . AddComPlusApp2 . . . . . . . . . . . . . . . . AddComponent . . . . . . . . . . . . . .
WRow . . . . . . . . . WRows . . . . . . . . WTable . . . . . . . . WTables . . . . . . . Visual Basic Functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
Call VBScript From Embedded Code . . . . . . Call VBScript From Installation. . . . . . . . . . Call VBScript From Installed Files . . . . . . . . Call VBScript From Property. . . . . . . . . . . . Display Message. . . . . . . . . . . . . . . . . . . . Download File From Internet . . . . . . . . . . . End Statement . . . . . . . . . . . . . . . . . . . . . Execute Program From Destination. . . . . . . Execute Program From Installation . . . . . . . Execute Program From Installed Files . . . . .
Chapter 1 Welcome Wise for Windows Installer is an installation development system for creating and editing Windows® Installer (.MSI) installation packages. It is a complete and userfriendly front end for generating Windows Installer database files, which are executed by the Windows Installer engine. With Wise for Windows Installer, you can create installations that are compliant with Microsoft’s Windows 2000 logo program.
Documentation Roadmap Documentation Roadmap The Wise for Windows Installer documentation assumes that you are proficient in the use of the Windows operating system. If you need help using the operating system, consult its user documentation. Use the following sources of information to learn the product. Online Help The online help contains detailed technical information and step-by-step instructions for performing common tasks. For details on using help, see Check Online Help on page 16.
Getting Help and Product Support Getting Help and Product Support Wise Solutions offers many resources to help you use our products. You can search the product help or reference manual .PDF for answers, or you can use one of the many support resources available to you as a registered Wise Solutions customer. Check Online Help You can access help in the following ways: ! To display context-sensitive help for the active page or dialog, press F1.
Getting Help and Product Support Take Advantage of our Consulting and Training Services When you have a challenging repackaging or installation problem, turn to Wise Solutions. Our consultants can help with script writing, repackaging, installation development, and other solutions that are fully customizable to fit your project and budget. Visit www.wise.com/consulting.asp for details. To upgrade your installation and packaging skills, consider Wise Solutions training.
Getting Updates Over the Web Getting Updates Over the Web You can get the latest version of Wise for Windows Installer using your active Internet connection. Minor point releases (x.01, x.02, and so on) are generally free, while major number releases generally incur an upgrade fee. Point releases generally contain maintenance updates such as bug fixes and minor feature additions. To check for updates: 1. Connect to the Internet. 2. In Wise for Windows Installer, select Help menu > Check for Updates.
Chapter 2 Basics Read this overview before creating your first installation. It contains information on getting started with Wise for Windows Installer. Topics include: ! Product Editions. ! About Visual Studio .NET Integration. ! Using Installation Expert. ! About the Product Home Page. ! Using the Task List. ! Where are Installation Resources Stored? ! Using the Enterprise Edition. ! Downloading Redistributable Files such as merge modules and Windows Installer and .NET runtimes.
Product Editions Product Editions Wise for Windows Installer is available in 3 editions, each designed to fulfill the needs of a particular type of user. The edition you purchase determines what features are available to you. ! Enterprise Edition is a Windows Installer® and .NET installation authoring tool supporting organizations that develop multiple applications that share common resources.
Product Editions Feature Std Pro Ent Share installation resources in the share point directory X Distribute to the share point directory X View and use resources shared by other applications X Shared Resource Reports in Wise for Windows Installer X Installation Expert Pages .NET Framework Security page X X Clean Build page X X Mobile Devices page X X MTS/COM+ page X X SQL Server Scripts page X X Web Files page, ability to edit .
About Visual Studio .NET Integration About Visual Studio .NET Integration You can use Wise for Windows Installer from within Visual Studio .NET. The Visual Studio integrated editor lets you create all the same installation file types that you create in the stand-alone Wise editor. The Wise editor and Visual Studio integrated editor are different interfaces for the same product; they share the same preferences, recently-used file lists, dialog templates, themes, and installation templates.
Using Installation Expert Using Installation Expert To access Installation Expert, click Installation Expert at the lower left of the Wise for Windows Installer main window. Page Views Page Area Page Groups View Navigation Testing and Distribution Page Views Use the Page Views drop-down list to select a page view, which is a set of Installation Expert page groups and pages. See About Page Views on page 24 and Customizing Page Views on page 25.
Using Installation Expert Testing and Distribution Compile, Test, Debug, and Run buttons test and compile the installation. The Distribute button copies the installation package to various locations, such as an FTP site or network directory. It also performs administrative installations. (In Visual Studio: These buttons are not available, but the same functionality is available through menu commands.
Using Installation Expert Which Page View Appears? ! The Display the page view associated with a project when a project is opened checkbox in Wise Options determines what page view appears. If you clear this checkbox, the page view in Installation Expert does not change when you open a project regardless of its associated page view. See Setting Installation Expert Options on page 51. ! The All page view is used when you open an installation file that does not have an associated page view. An .
Using Installation Expert You can now customize the page view by changing its page groups and pages. To customize a page view: 1. From the Page Views drop-down list in Installation Expert, select . The Customize Page Views dialog appears. 2. 3. Select the page view from Page View Name, and do any of the following: • To add a new page group, click the Page Groups Add button and enter a name. • To rename a page group, select the page group and click Rename.
Using Installation Expert Using the Current Release Drop-Down List The Current Release drop-down list appears on pages in the Release Definition page group. A release is a special version of your application. Example: a 30-day evaluation release for evaluators. Use Current Release to configure separate settings, media, and language options for each release.
About the Product Home Page About the Product Home Page The Product Home page provides information about your installation of Wise for Windows Installer, quick access to areas of the current installation, and access to Wise Solutions resources on the Web. The Product Home page appears by default when you start Wise for Windows Installer. To prevent the Home page from appearing by default, clear Display Home page at startup on Wise Options > General tab.
Using the Task List Using the Task List When Wise for Windows Installer encounters installation issues that could cause problems, it displays them in the Task List. You can manually display or hide the Task List from the View menu. The Task List gathers all installation issues into one place, and makes it easy to analyze their causes. If the issue is caused by an error in a table, you can quickly jump from the Task List to the row in the table that caused the error.
Using the Task List Validation issues found by Package Validation. See Validating a Package on page 370. A task you created. In the Enterprise Edition, this icon also appears with a task that reminds you to add the package meta data to the Software Manager database. Operations You Can Perform in the Task List ! Filter tasks by type. See Filtering the Task List. ! Find table errors. See Finding Table Errors From the Task List on page 30. ! Sort a Task List’s column by clicking its header.
Using the Task List Caution Deleting, adding, or editing table data directly is not recommended unless you are an experienced Windows Installer developer with a clear understanding of Windows Installer database technology. Editing table data might result in unexpected, undesirable results, including damage to the installation. Wise Solutions cannot provide technical support for problems arising from table editing.
Where are Installation Resources Stored? Where are Installation Resources Stored? Wise for Windows Installer uses resources such as installation templates, component rules, language files, and so on, to create installations. In the Standard and Professional Editions, these resources are stored in subdirectories of the Wise application directory. In the Enterprise Edition, they are stored in subdirectories of the share point directory. (Enterprise Edition only.
Where are Installation Resources Stored? Directory Contents Themes Contains Themes.ini, which stores information about themes you’ve added or customized. Also contains subdirectories that store the images for each theme. Validation Contains the predefined validation modules (.CUB files) that are used by Package Validation. Virtual OS (Enterprise Edition only.) Provides a shared location in which you can place Virtual OS files (.WOS) that are used by the Universal Import feature of Software Manager.
Using the Enterprise Edition Using the Enterprise Edition " Enterprise Edition only. With the Enterprise Edition of Wise for Windows Installer, you can develop consistent, accurate, and high quality installations based on corporate standards. The Enterprise Edition ensures that you use the correct versions of resources, such as files and registry keys, that are shared across multiple applications. Example: A developer who adds or updates a .
Using the Enterprise Edition ! Merge modules ensure that developers always access approved versions of merge modules by storing merge modules in a central location, or by using merge modules that are in the Software Manager database. ! Validation modules (.CUB files) simplify the quality assurance process by ensuring every installation passes the same validation tests. ! Reports let you share customized report menus and custom reports.
Using the Enterprise Edition Share Point Directory Contents ! Resources that are used to create Windows Installer installations. Examples: installation templates, component rules, language files, and so on. ! Predefined reports. ! Temporary .QUE files representing packages that have been distributed but not imported into the Software Manager database. ! Source files of installations you import into the Software Manager database.
Using the Enterprise Edition second directory, 000\002. The result is a set of all the unique source files used by all the packages in the Software Manager database. Also see: About the Share Point Directory on page 35 Copying an Installation to the Share Point Directory on page 280 Importing From the Share Point Directory in the Software Manager Help Generating Package Contents Reports " Enterprise Edition only.
Using the Enterprise Edition The reports are displayed in HTML format. The .XSL templates used to format these reports are located in the Templates\Reports subdirectory of the share point directory. You can customize the .XSL templates to supply branding information, to filter data, or to transform the data to another format. You also can generate resource reports in Software Manager. The Software Manager reports contain similar information.
Downloading Redistributable Files Downloading Redistributable Files The Download Redistributables wizard, available from the Help menu, lets you obtain merge modules, Windows Installer runtime installers, and .NET Framework runtime installers. You need the Windows Installer runtimes if you decide to pre-install Windows Installer with an installation. You need the .NET Framework if you are creating an installation that contains .NET elements.
Downloading Redistributable Files 2. Mark Wise Solutions’ Web Site or Product CD and click Next. 3. If you marked Product CD, specify the location of the CD in the Product CD Location dialog. Then click Next. A Download Files dialog appears while all available redistributable files are retrieved. The Available Redistributable Files dialog then appears. 4. From Redistributable Type, select the type of redistributable to download. 5.
Downloading Redistributable Files 1. Select Help menu > Download Redistributables. (In Visual Studio: Help menu > Wise Help > Download Redistributables.) The Source Location dialog appears. 2. Mark Other Vendors’ Web Sites and click Next. When all available redistributables are retrieved, the Available Redistributable Files dialog appears. 3.
Chapter 3 Setting Up Before you create and edit installations, set up Wise for Windows Installer to reflect your company’s standards: ! Set options that control the installations you create and determine the installation resources you use. ! Decide whether you need to customize the templates that installations are based on. ! Decide which rule set to use to help you manage the creation of components in installations. You can edit the predefined rule sets or create new rule sets.
Setting Options Setting Options You can set options that control the installations you create and determine the installation resources you use. Some of the options are global; they are set for all files you open with Wise for Windows Installer, including files you created previously. Other options provide defaults for new files and do not affect existing files. You set options on the Options dialog, which you access by selecting Tools menu > Options.
Setting Options ! Create XML copy during save Mark this to update a copy of the installation in XML format every time you save. If a copy does not exist, it is created. The copy has the same name as the installation file with the extension .XML appended, and it is saved in the same directory. (Example: If the current file name is Application.wsi, the XML copy is named Application.wsi.xml.
Setting Options Prompt always shows a dialog that prompts you to choose the editor. Last Saved In uses the editor in which the installation file was last saved. ! Reload last project at startup Mark this to open the last installation you worked on when you launch Wise for Windows Installer. (Not available in the Visual Studio integrated editor.) ! Refresh Projects Integrated with Visual Studio .NET When you open a project that has been integrated with Visual Studio .
Setting Options Assembly Scanning Options The scanning options are available only if the .NET Framework is installed on your computer. ! Scan Dependencies Specify how dependency assemblies are added to an installation. You can add them manually or have Wise for Windows Installer scan the assembly manifest for dependencies and add them automatically. Changing this option does not affect assemblies that have already been added to installations.
Setting Options The different scan options let you determine whether the advertising information is added to the advertising tables (AppId, Class, Extension, Mime, ProgId, TypeLib, Verb), to the registry, or both. The scan options also cause AppPath registry information to be added to the installation automatically, although it is not related to advertising. Only AppPath information at HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\App Paths\ is added.
Setting Options This field sets the default for new components; if you change it, existing components are not affected. The Rescan advertising information during compile checkbox on the Component Details dialog can override this setting for individual components. Setting Digital Signature Options You can add a digital signature to an installation on the Digital Signature page. If an installation includes a digital signature, you use the signcode.
Setting Options Setting ExpressBuild Options " Professional and Enterprise Editions only. Note For multi-processor compile to occur using distributed computers, all source files of the installation must be on a shared drive and must be specified in the installation with UNC paths. (Example: \\SERVER\file.exe). In addition, when you open the installation file, you must open it in such a way that it is referenced by a UNC path.
Setting Options Requirements for Using ExpressBuild " Professional and Enterprise Editions only. ! The computer that initiates the compile of the installation must be running Windows NT, Windows 2000, or Windows XP or later. ! If you use a computer running Windows 9.x or Me to share compile processing, the workgroup name of the 9.x/Me computer must match its domain name. Also, the build group name must be in 8.3 file name format. ! In the following instances, because of .
Setting Options You can mark any combination of the 3 checkboxes below. After you mark either of the first 2 checkboxes, compiles will attempt to use multi-processor compile unless prevented from doing so. If you mark Allow My Computer to Build for Others, your computer is immediately available to assist in compiles being performed on other computers.
Setting Options go to FeatureB, you no longer see the directory you made for FeatureA. This does not apply to the Web Files page. ! View registry keys for all features on Registry page Mark this to display all registry keys on the Registry page, regardless of what feature the registry key was created for. This displays a composite view of all registry keys created for all features.
Setting Options In the Enterprise Edition, you can use merge modules that are in the Software Manager database, which helps ensure that developers always access approved versions of merge modules. ! Default Merge Module Directory Shows the path to the default merge module directory.
Setting Options Setting Repository Options " Enterprise Edition only. You can specify the directories that contain shared resources you use in installations. Select Tools menu > Options and click the Repository tab. (In Visual Studio: Tools menu > Options > Wise Options > Repository.) You also can change the share point directory and Software Manager database from this dialog. Note (Visual Studio integrated editor.) To display context-sentitive help, click the Wise Help link on this dialog.
Setting Options Caution If you are sharing component rules in the Enterprise Edition, be careful when editing existing rule sets because your changes will overwrite rule sets used by other members of the development team. ! Custom Actions Specify the location in which you will save files used in custom actions (examples: WiseScripts, .DLL files, JScript files, and VBScript files) that can be added to installations. This is the default location whenever you browse for a file in a custom action dialog.
Setting Options Note If the following options do not appear on the Source Control tab, you probably don’t have a source code control system on your computer. It could also be that your SCCS is unrecognized or that there are communications problems between the SCCS server and your computer. ! Enable source control Mark this to enable all source control functionality both in the current installation and all future installations.
Setting Options Note (Visual Studio integrated editor only.) The Setup Wizard contains options that let you change the target platform for a particular project. • Default to 64-bit .MSI/.WSIs If you mark this, all new .MSI and .WSIs that you create are 64-bit enabled. • Default to 32-bit .MSI/.WSIs If you mark this, all new .MSI and .WSIs that you create are 32-bit enabled.
Setting Options Note (Visual Studio integrated editor.) To display context-sentitive help, click the Wise Help link on this dialog. Projects Options To override these defaults for individual installations, or to change them for existing installations, edit the Projects page of the installation project settings. See Entering Project Settings on page 84.
Setting Options Setting Wildcard Groups On the Wildcard Groups tab, you can create groups of wildcards so you don’t have to type multiple wildcards repeatedly. Select Tools menu > Options and click the Wildcard Groups tab. (In Visual Studio: Tools menu > Options> Wise Options > Wildcard Groups.) On the Files and Web Files pages in Installation Expert, you use the wildcard groups when you add directory contents.
Creating and Editing Installation Templates Creating and Editing Installation Templates When you create a new installation or merge module, it gets its configuration from a template file. Templates contain logical defaults and commonly used settings. Some template files are predefined and appear when you create a new installation. You also can create your own templates. Example: Suppose that all the installations you create have the same system configuration requirements and the same dialogs.
Creating and Editing Installation Templates displayed when the template was created. If the template’s default page view is a custom page view, you can customize it. See Customizing Page Views on page 25. 6. To test the new template, select File menu > New. The New Installation File dialog appears and the file you just created appears in the Custom Templates category. If the New Installation File dialog does not contain the new template, verify that you saved the installation as a .WSI or .
Creating and Editing Installation Templates 10. To test the template, verify that the changes you made in the installation template are present in this new installation file.
Component Rules Component Rules You can select or create rules that help you manage the creation of components in an installation. Using component rules eliminates the need to specify component information for every individual resource you add to an installation and ensures that components are created consistently across all installations. Component rules can also help you align component GUIDs in an upgrade with component GUIDs in previous versions of the installation.
Component Rules How Component Rules Are Applied Component rules are applied in the order they appear from top to bottom in the list of rules on the Customize Component Rules dialog. When a rule has multiple conditions, only resources that meet all the conditions have the rule applied to them. Once an added resource matches the conditions in a rule, the action is applied and no subsequent rules are evaluated for that resource.
Component Rules file name of the keypath file, or the naming convention specified in the Default field above. 6. To make the options in the Component Key Values section the defaults for all future installations, mark Make this the default key naming convention for all installations. 7. Click OK on the Component Rule Selection dialog. All resources that you add to this installation from this time forward will be organized into components according to the rule set and other conventions you specified.
Component Rules 6. Click OK on the Previous Installation Versions dialog. All new resources you add to the upgrade installation will be checked against and aligned with the previous installations you specified. Customizing Component Rules If the predefined component rule sets do not reflect your company’s standards, you can create a new rule set. The predefined rule sets, Microsoft Best Practices and One file per component, are read-only and cannot be modified.
Component Rules • To copy the rule set, click Copy, type the new name on the Enter Rule Set Name dialog, and click OK. • To modify the rule set, click Modify. The Customize Component Rules dialog appears, where you can add, edit, and delete rules. For details, see Adding and Editing Component Rules on page 67. Note If you selected a predefined rule set, all the buttons on the Customize Components Rules dialog are disabled because the predefined rule sets are read-only.
Component Rules 2. In the Which condition(s) do you want to check? list, mark the checkbox next to each condition to check. When there are no conditions for performing the action(s) in this rule, select the condition Always perform associated action. As you mark checkboxes, the conditions appear in the Rule description list. If you select a condition that is incompatible with a condition you’ve already selected, the first condition you selected is removed from the list. 3.
Component Rules ! Add all .TLB files to their own components If the added resource is a .TLB file, create a new component. ! Group Matching .HLP and .CNT files together If resource file names are the same and their file extensions are .HLP or .CNT, add them to the same component. The .HLP will be the keypath file. ! Group matching .CHM and .CHI files together If resource file names are the same and their extensions are .CHM or .CHI, add them to the same component. The .CHM will be the keypath file.
Component Rules ! Add all files to their own components If the added resource is a file, create a new component. ! Put registry keys associated with files or components in matching components If the added resource is a registry key, and the registry value name or value refers to a file or component, add the resource to an existing component that contains the same type of resource.
Chapter 4 Working With Wise Installation Files This section describes the basic procedures for working with installation files. Topics include: ! Before You Create an Installation. ! File Types. ! Project Files and Database Files. ! Options for New Installations. ! Starting a New Installation. ! Specifying the Target Platform in an Installation. ! Entering Project Settings. ! How the Installation Integrates With the Solution. ! Scanning the Solution for New Files.
Before You Create an Installation Before You Create an Installation To avoid interruptions during installation development, gather the following information before you begin creating an installation in Wise for Windows Installer. ! All the files to install on the destination computer. This includes program files, files necessary for optional features, related .DLLs, drivers, and other support files. (Visual Studio integrated editor only.) Some of these files (examples: .DLLs, .OCXs, and .
File Types File Types In Wise for Windows Installer, you can create and edit different types of Windows Installer database files. You can work in the Windows Installer database file or in a project file that contains instructions for compiling the Windows Installer database file. See Project Files and Database Files on page 74. Each extension is described below. Extension Description .MSI Windows Installer database, which is a distributable installation. The .
Project Files and Database Files Project Files and Database Files Typically, the installation you distribute is an .MSI. Windows Installer operates on .MSIs, which are a type of relational database that stores installation information and files in tables. See About Microsoft Windows Installer on page 538.
Starting a New Installation Starting a New Installation Follow the steps below to create a new standard Windows Installer installation. To create a new transform, see Creating a Transform Based on an Existing .MSI on page 348, and to create a new merge module, see Creating a Merge Module As a New Installation on page 334. To start a new installation in the Wise editor: 1. Select Start menu > Programs > Wise Solutions > Wise for Windows Installer. The New Installation File dialog appears.
Starting a New Installation ! As a project integrated with a Visual Studio .NET solution. Do this to create an installation for an application you’ve developed in Visual Studio .NET. See Creating an Installation Within a Solution on page 76. ! As a stand-alone installation that is not integrated with a solution. Do this to package application files that are not already in a Visual Studio .NET solution into an installation. See Creating a Stand-alone Installation on page 77.
Starting a New Installation 5. In Name, enter a name for the installation file. In Location, specify the directory in which to save the project. 6. Mark Add to Solution. 7. Click OK. If you selected the Windows Application icon, an installation project is created in the location you specified and is listed in Solution Explorer. Skip to the last step. If you selected the Setup Wizard icon, the Wise Setup Wizard appears. 8.
Starting a New Installation • Windows Application Project Create a .WSI (Windows Installer project), which contains instructions for compiling an .MSI. When you work in a .WSI instead of an .MSI, the .WSI file is smaller and you can set multiple options for the output of the .MSI. For information on .MSI and .WSI files, see File Types on page 73 and Project Files and Database Files on page 74. 5. Click Open. A new installation opens.
Options for New Installations Options for New Installations There are several ways to create new installations. To display options, select File menu > New. (In Visual Studio: select File menu > New Project or File menu > New File, and select the Wise project type or category.) You can create new files either in Windows Installer database format (.MSI, .MSM) or in Wise’s project format (.WSI, .WSM). See Project Files and Database Files on page 74.
Options for New Installations ! Device Driver Creates an installation that installs a device driver. This template supports Microsoft’s Driver Install Frameworks (DIFx). It includes custom actions that install and uninstall the device driver properly. See Creating a Device Driver Installation on page 78. ! Merge Module See Creating a Merge Module As a New Installation on page 334. (In Visual Studio: see Creating a Merge Module Within a Solution on page 336.
Options for New Installations distributable file. They do not contain installation files. This option lets you edit and save the .WSI quickly and has more options for outputting the .MSI. A .WSI compiles to an .MSI, and a .WSM compiles to an .MSM (merge module). ! Target Platform options (Professional and Enterprise editions only.) This section appears if the Select platform in New Installation File dialog option is marked in Wise Options.
Specifying the Target Platform in an Installation Specifying the Target Platform in an Installation " Professional and Enterprise Editions only. You can specify whether installations are enabled for 32-bit or 64-bit platforms. The target platform is set when the installation is first created; you cannot change the target platform after the file is created. The target platform default for new installations is controlled by the Target Platform Selection setting in Wise Options.
Specifying the Target Platform in an Installation ! The Read Registry Value dialog contains a checkbox that lets you include 64-bit components in a registry value search. See Searching For a Registry Value on page 174. ! When you create a custom action that calls a JScript or VBScript file, a checkbox lets you call a 64-bit script. ! The Target Platform field on the Product Details page provides a quick way to determine for which platform an installation is enabled.
Entering Project Settings Entering Project Settings " Visual Studio integrated editor only. Each Visual Studio installation project has settings that control how it interacts with other projects in the solution. Stand-alone installations that are not integrated with a Visual Studio .NET solution do not have project settings. To access project settings: Do one of the following: ! While creating a new installation project, select Setup Wizard on the New Project dialog.
Entering Project Settings Project Type Page " Visual Studio integrated editor only. The Project Type page lets you specify what kind of installation project you are creating. This page is accessible only from the Wise Setup Wizard when you create a new installation (Professional and Enterprise Editions only). ! Windows Application Create a standard Windows Installer installation (.WSI). This is intended for installation to Windows computers or servers. See Creating an Installation Within a Solution.
Entering Project Settings • Never scan solution If you select this, you must add new files to installations manually using the Files page. Also, when files are removed from a solution, you must remove them from the installations manually. • Prompt only when new files are detected Select this to be prompted each time there are new files in the solution that need to be added to the installation. The prompt appears during save, build, or compile.
Entering Project Settings ! Target Platform (Wise Setup Wizard only.) This defaults to the Target Platform Selection in Wise Options. You can change the target platform for this particular installation project. Because you cannot change the target platform after the project is created, this option does not appear on the Property Pages dialog. Also see: Creating an Installation Within a Solution on page 76 Entering Project Settings on page 84 Project Outputs Page " Visual Studio integrated editor only.
How the Installation Integrates With the Solution How the Installation Integrates With the Solution " Visual Studio integrated editor only. When you add an installation to a Visual Studio .NET solution, as described in Creating an Installation Within a Solution on page 76, the following items are added to the installation project: ! All primary outputs (.EXEs and .DLLs) of the projects in the solution, and all content files in the solution.
How the Installation Integrates With the Solution Scanning the Solution for New Files " Visual Studio integrated editor only. Wise for Windows Installer can scan projects in a solution for new output files that need to be added to the installation, and add those files to the installation. Scanning occurs when you: ! Load, save, or build an installation project within a solution. ! Change the installation’s project settings. Examples: output types, projects to include.
Opening an Installation Package Opening an Installation Package " Enterprise Edition only. Not available in the Visual Studio integrated editor. In the Enterprise Edition, when you select File menu > Open, the Open dialog that appears contains two tabs that let you open an installation package from a directory or from the Wise Software Repository.
Opening an Installation Package If you change an installation that you opened from the repository, re-import it into the Software Manager database. Otherwise, changes will not be reflected in the repository.
Comparing Windows Installer Files Comparing Windows Installer Files Visual MSIDiff lets you compare .MSI, .WSI, .MSM, .WSM, or .MST files and see the differences in the Tables tab in Setup Editor. Options for Comparing Files ! Compare the current file to another file. ! Compare any two files. (Not available in the Visual Studio integrated editor.) ! Compare a transform to its base .MSI, to see the items the transform changes in the .MSI. To view differences between two Windows Installer files: 1.
Saving an Installation as XML Saving an Installation as XML You can save a copy of an installation (.WSI, .MSI, WSM, or .MSM) in XML format. This lets you check the XML version of the installation into a text-based source code control system (SCCS), use text-based file comparison tools to find changes, or perform analyses with XML reporting tools.
Working With Installations in the Software Manager Database Working With Installations in the Software Manager Database " Enterprise Edition only. There are restrictions on editing and saving an installation that has been added to the Software Manager database (either by adding its meta data or importing it).
Compiling, Testing, and Running An Installation Compiling, Testing, and Running An Installation To test an installation, you can: ! Compile the installation to an executable .MSI or .EXE. See Compiling An Installation. ! Test the installation, which appears to run but does not make any modifications on your system. See Testing An Installation on page 96. ! Debug the installation in an .MSI debugger, which lets you step through the installation while viewing the property values and other table data.
Compiling, Testing, and Running An Installation ! Build Compiles only the project you have selected in Solution Explorer. If quick compile is enabled and you have already built this project, this command compiles only what has changed since the last build. ! Rebuild Solution Compiles all files in all projects in the solution. ! Rebuild Compiles all files in the project you have selected in Solution Explorer. ! Compile Compiles the current project or installation file.
Compiling, Testing, and Running An Installation ! Force Reinstall Normally, if an application is installed and you attempt to install it again, Windows Installer prompts you to remove it. This option uses command lines to bypass the uninstall. Existing resources are replaced, and new resources are laid down. (The command line msiexec.exe /FAMSUV [MSIFILENAME] is used. See Command Line Options in the Windows Installer SDK Help.
Chapter 5 Defining an Installation Project When you start a new installation, you enter information about the installation and the application, and define the structure of the installation. Topics include: ! Project Summary Page. ! Product Details Page. ! General Information Page. ! Add/Remove Programs Page. ! Features Page. ! Managing Binary Resources.
Project Summary Page Project Summary Page The Installation Expert > Project Summary page provides the following information about the current installation project and quick access to areas of the installation: ! Links to Installation Expert pages that have content in the current installation and, where appropriate, the number of items defined on each page. Examples: how many features are defined on the Features page, how many files have been added to the Files page, and so on.
Product Details Page Product Details Page Use Installation Expert > Product Details page to enter, edit, or view an installation’s meta data. Meta data is displayed for .MSI, .WSI, and .MST files. In the Value column of the Package Meta Data table, you can enter or edit meta data that is not read-only. Note The meta data that appears when you create a transform comes from the base .MSI. If you change a transform’s meta data, it is set when the transform is applied. (Enterprise Edition only.
Product Details Page (Visual Studio integrated editor only.) If this installation is part of a Visual Studio .NET solution, this is pre-filled. ! Version Enter the version number of the application. Windows Installer uses this to identify this application when subsequent patches or upgrades are applied. The version should be in the format AA.BB.CCCC.DDDD, where AA is the major version, BB is the minor version, CCCC is the build version, and DDDD is optional and ignored. It is stored as a string data type.
Product Details Page ! Target Platform (Professional and Enterprise Editions only.) This read-only field displays the platform for which this installation is enabled, 64-bit or 32-bit. The platform is set when you create the installation. To change the target platform for future installations, see Setting the Default Target Platform on page 56. ! Application Type Specify whether this is a standard Win32 or a .NET installation.
Product Details Page If this is the first time you’ve saved the installation, the Save As dialog appears. (In Visual Studio: the Save File As dialog appears.) Enter a name for the file and click Save. 4. If a package with the same application and package name is already in the Software Manager database, a warning message appears. Click OK and change either the application or package name to create a new package in Software Manager.
Product Details Page When should you increment the version field? ! When you add or delete files from the installation. ! When you create, remove, or edit any other items besides files. Examples: services, ODBC, runtimes, registry, and so on. ! If you plan to create a patch that updates earlier versions to this version. ! When you include upgrade entries on the Upgrades page of versions that this installation will upgrade.
General Information Page General Information Page Use Installation Expert > General Information page to set the summary information and the required Windows Installer version for the installation file. End users can see the summary information by right-clicking the compiled .MSI or .EXE in Windows Explorer and selecting Properties. For information on summary items, see Summary Property Descriptions in the Windows Installer SDK Help. ! Title Enter the name of the application.
Add/Remove Programs Page Add/Remove Programs Page Windows 2000 and Windows XP have an Add/Remove Programs applet that supports a rich display of applications. Use Installation Expert > Add/Remove Programs page to enter the information necessary to support these capabilities. ! Do not display in Add/Remove Programs list Mark this to exclude your application from Add/Remove Programs.
Features Page Features Page Use Installation Expert > Features page to create the structure of an installation by defining: ! What features make up the application. ! How those features are presented to the end user during installation. ! What conditions must be true for portions of features to be installed.
Features Page ! To rearrange features, click Move Up and Move Down at the right of the page. You can move features within their current level only, in their current sibling group. You cannot move features to their parent or child levels. ! To add a condition to a feature, click its name and click Add Condition at the right of the page. See Using Conditions With Features on page 115 and Adding and Deleting Feature Conditions on page 115.
Features Page Dependent on Core feature. Place dependent features as siblings to core files, but require core files: In the illustration below, the features External_Text_Editor and External_Graphics_Editor, which are built into the application, are dependent on the presence of the core application files, which are assigned to the Core feature.
Features Page Use conditions with features: In the illustration below, the Core feature has 2 conditions. VersionNT specifies that the operating system must be Windows NT, 2000, or XP, and Version9X specifies that the operating system must be Windows 95, 98, or Me.
Features Page The drop-down list options are a subset of the options available in the Feature Details dialog, which you access by clicking the Details button at the right of the Features page. Note The first 4 options in the feature’s drop-down list set the default only; the end user can change the default during installation.
Features Page Configuring a Feature Using the Feature Details Dialog When you create a new feature or edit an existing feature, you can configure the feature using the Feature Details dialog. Access this dialog from Installation Expert or Setup Editor. See Adding a New Feature on page 110. (Visual Studio integrated editor only.) The Feature Details dialog also appears when you click the Add New Feature button on the Add Project Outputs to Installation dialog.
Features Page • Always install this feature Set the feature’s level value to 1, which means that it gets installed by default for either Typical or Complete. • Custom Set the feature’s installation level value yourself. Example: if you want a feature to be installed for a Complete installation, but not for a Typical installation, set a custom level value that’s greater than 3 and less than or equal to 1000. The Custom Value field becomes available.
Features Page external files that can run from the source. See the description of Media Type in Adding a Media Item on page 202. ! Advertising Specify the default setting for how this feature supports advertising. If a feature is advertised, it is not installed, but it appears to be installed to the end user.
Features Page Using Conditions With Features You can add conditions to features to specify different actions based on installation properties, system configuration, end user choices, and so on. Both conditions and features are listed in the Current Feature drop-down list, which appears on all Installation Expert pages in the Feature Details page group. Just as you can specify options on a per-feature basis, you can also specify options on a per-condition basis.
Features Page The condition appears in the Current Feature drop-down list. If you want to make file changes or other system changes on the destination computer only if this condition is true, you first select this condition from the Current Feature drop-down list. To delete a condition: 1. Select Installation Expert > Features page 2. Select a condition. 3. Click Delete at the right of the Features page. You are prompted to choose what to do with the components that are associated with the condition.
Managing Binary Resources Managing Binary Resources Use Installation Expert > Resources page to add and update binary resources, and to change the names or source files for existing binary entries. It provides an easy way to edit and update peripheral files. (Examples: graphics you might have added for an installation dialog or .DLLs you might call with a custom action.) Any changes you make here are reflected in the Binary table that you can access in Setup Editor > Tables tab.
Managing Binary Resources Note If you’ve saved a resource with an unspecified source file to a new file, don’t save the installation until you verify that you selected the appropriate file extension. To do this, select the resource on the Resources page and click the Edit button at the right of the page. The file should open in an appropriate application. If it doesn’t, select Edit menu > Reset Page and save the resource again, using a different extension.
Managing Binary Resources You can only refresh binary resources with known source files. If you try to mark the Refresh checkbox for a resource whose source file is shown as unspecified, you are prompted to export the data to a new source file. To resolve compile errors for binary resources that appear in red: If a binary resource marked to be refreshed appears in red, with question marks in the Last Modified and Size columns, the name or the location of its source file has changed.
Chapter 6 Assembling an Installation The Feature Details page group of Installation Expert lets you add files and other system changes to an installation. For information on Installation Expert, see Using Installation Expert on page 23. Topics include: ! Files or Web Files Page. ! Registry Page. ! INI Files Page. ! Shortcuts Page. ! Adding an Environment Variable. ! Adding File Associations. ! Services Page. ! Adding an ODBC Item.
Files or Web Files Page Files or Web Files Page On the Files or Web Files page, you specify the directories and files to be installed on the destination computer. You also can specify operations to remove, copy, or move files on the destination computer during the installation. On the Web Files page, you can also add Web sites, virtual directories, and Web folders, and set their options.
Files or Web Files Page ! Drag and drop folders and files to the page and from Windows Explorer, or use the following buttons: • Add Contents Add an entire directory to the installation, filter the directory using wildcards, and link the directory so that the installation’s contents change dynamically as the directory’s contents change. See Adding Contents of Directories to the Installation on page 127. • Add File Add files to the installation; see Adding Files to an Installation on page 123.
Files or Web Files Page installed; and Program Files (x86), in which 32-bit applications and components are installed. See Setting the Default Target Platform on page 56. ! Global Assembly Cache. (.NET installation only.) This is used for assemblies that will be shared by many applications on the destination computer. It appears only if you select either .NET Application or Mixed (.NET and Win32) as the application type on the Product Details page. ! wwwroot.
Files or Web Files Page files to the share point directory. If you do so, the .QUE file for that package is reset and you must re-import the package in Software Manager. From Installation Expert: 1. Select the Files or Web Files page. 2. From Current Feature, select a feature or condition. (Because any item you add must be assigned to a specific feature, you cannot add an item when All Features is selected.
Files or Web Files Page 3. Specify one or more files and click Open. The file is added to the component’s installation directory and appears in the upper right pane. If other dialogs appear, see Additional Dialogs below. Additional Dialogs ! If you add a .NET assembly, and if Scan Dependencies in Wise Options is set to Prompt to scan dependencies, then Wise for Windows Installer: • Scans the assembly manifest for dependencies.
Files or Web Files Page repository. See Adding Files From the Wise Software Repository on page 127. (Enterprise Edition only.) Note On .NET Framework versions earlier than 1.1, scanning does not occur when you add an assembly from a UNC or mapped network drive (example: the share point directory). To enable scanning of such assemblies, either upgrade to .NET Framework version 1.1 or later, or change your .NET security so that the share point directory is fully trusted.
Files or Web Files Page Also see: Downloading Redistributable Files on page 39 Adding Files From the Wise Software Repository " Enterprise Edition only. The Files in Repository dialog appears when a file that is used by a package in the Wise Software Repository is added to an installation. Typically, it appears when you add a file to the Files or Web Files page. It might also appear after you run tools that add files to an installation (example: ApplicationWatch).
Files or Web Files Page 4. In the lower left list box, select a directory where you want to add the contents. 5. Click Add Contents. The Add Contents dialog appears. 6. Complete the dialog: • Dest. Directory Enter the name of the installation directory that will hold the contents of the directory you’re adding. If you don’t enter a directory name, the contents are added to the directory that’s selected in the lower list box.
Files or Web Files Page Adding Files From Outside the Solution " Visual Studio integrated editor only. When you add files from outside a solution to an installation that is part of a solution, those files do not appear in the Source Files tree under the installation project in Solution Explorer. In addition, you cannot add those files to source control, because Visual Studio .NET does not allow files outside a solution to be managed with source control.
Files or Web Files Page Also see: Files or Web Files Page on page 121 Adding Files to an Installation on page 123 Adding .NET Assemblies to the Installation Note The ability to create .NET installations is supported only by Windows Installer 2.0 or later. When you create a .NET installation, you can use the Files or Web Files page to add .NET assemblies. When you add a file that is a .NET assembly to an installation, the MsiAssembly and MsiAssemblyName tables are updated. If the .
Files or Web Files Page Editing Settings for Automatic Updating On the Files or Web Files page, if you link a source directory to a directory in the installation, the files in the installation are updated when the contents of the source directory change. You can add and edit the settings for automatic updating of a directory: 1. Select Installation Expert > Files or Web Files page. 2. From Current Feature, select a feature or condition.
Files or Web Files Page Windows Installer only increments the shared DLL count on a file if the file is installed and has an existing shared DLL count. If a component is installed to the Global Assembly Cache, you cannot increment the shared DLL count. • Leave installed on uninstall Mark this to leave the component installed when its parent feature is uninstalled. • Check condition during reinstall Mark this to check conditions attached to the component when the application is reinstalled.
Files or Web Files Page • Directory Specify the directory on the destination computer where the file is located or create a new subdirectory. To create a new subdirectory, select a directory and click New Folder. • File Name Specify the name of the file to be removed. You can use wildcards to select multiple files or you can mark All Files to select all files in the selected directory. • Remove During Specify when the file should be removed: during install, uninstall, or both install and uninstall. 3.
Files or Web Files Page • Source File Name Specify the name of the file to be copied or moved. You can use wildcards to select multiple files or you can mark All Files to select all files in the selected directory. • Dest. Directory Specify the directory on the destination computer to copy or move the file to or create a new subdirectory. To create a new subdirectory, select a directory and click New Folder. To rename files on the destination computer, make the source and destination directory the same.
Files or Web Files Page The File Details dialog for multiple files appears. Only a subset of the editing options are available. You cannot edit permissions, self-registration settings, assembly settings, or view shared resources. For details, see Editing General File Details on page 135. Note If you add a file to an installation, then add it again to a different directory, the second instance is added as a duplicate file.
Files or Web Files Page • Self-Register OCX/DLL (Multiple Files dialog only.) Many files support self-registration (examples: many .OCXs and some .DLLs). Mark this to self-register these files during the installation with an unordered registration method. • File has Valid Checksum Many executable files (examples: .EXE, .OCX, .DLL, etc.) store a checksum that can be checked against actual file contents to ensure the file is not corrupted. Mark this to have file contents verified during reinstall or repair.
Files or Web Files Page 3. Enter the Domain and User name and click OK. 4. The domain and user names appear in the upper list box, and the list of permissions is enabled. 5. To set permissions, mark the checkboxes. You can add multiple users. Caution If you set permissions for a folder that is written to by this installation, be sure that the user installing this application has privileges to write to the folder.
Files or Web Files Page Editing Assembly Settings for Files Use the Assembly tab on the File Details dialog to enter and edit information about .NET and Win32 assemblies. Wise for Windows Installer uses this information to register the assembly files. ! For a .NET assembly, use the Assembly tab to enter the assembly attributes. If the .NET Framework is installed on your computer, this information is filled in from the assembly manifest and you should not have to change it.
Files or Web Files Page and caches it on the target computer so assemblies load and execute faster. For details, search for “Native Image Generator” in the MSDN Library (msdn.microsoft.com/library/). 4. Click OK. Creating a Win32 Assembly Your can use Win32 assemblies to isolate applications on destination computers running under Windows XP. Isolating an application .EXE means its dependent, shared .DLL and .
Files or Web Files Page • External Manifest Adds the attributes of an external manifest file as a dependency. Specify a manifest file and click OK. The manifest you specify and the file it points to must be present on the destination computer or in the installation. They must also be located in the application’s directory structure or the WinSxS directory. See Private Assemblies in the Windows Installer SDK Help. 7. To add more dependencies, repeat the preceding step. 8.
Files or Web Files Page version, date/time, or size; the files are installed to the same directory, but component GUIDs do not match. To select a different file: Caution If you are working in a Visual Studio solution, selecting a file outside the solution breaks the integration of the installation with the solution. When you build the solution, the outside file will not be built. Also, a source file outside the solution cannot be added to source control. 1.
Files or Web Files Page The Edit button becomes enabled for editable lines only after you mark Enable Dynamic Content. 4. Select a line and click the Edit button. Not all lines are editable, only lines that have name-value attributes. (Example: .) The Attribute Editor dialog appears. 5. 6. To edit an XML attribute: • Select the attribute in the top list box. • In Dynamic Value, type a new value to replace the current value at runtime.
Files or Web Files Page Using WiseComCapture.exe To scan a file’s self-registration information and add it to an installation, the file must be registered on your computer. If you prefer not to register files on your computer, you can run the scan routine as a stand-alone utility on a different computer. This utility, WiseComCapture.exe, is in the Wise for Windows Installer application directory. It extracts the registration information to a .
Registry Page Registry Page Use the Registry page to specify the registry entries to be installed, removed, or edited on the destination computer. You can either add registry entries manually or import a registry file (.REG). If you import a Visual Basic .VBR file, it will import the registry settings, but will not automatically set up for the installation of either a remote automation or DCOM™ server. You also can export to a registry file.
Registry Page • Add Values Copy values from your computer to the installation. • Add Create a new key or import a registry file into the installation. • Delete Key, Delete Value Remove a registry key or value from the installation. • Details Edit registry key settings.
Registry Page 2. From Current Feature, select a feature or condition. (Because any item you add must be assigned to a specific feature, you cannot add an item when All Features is selected.) Items you add to a feature are only installed on the destination computer if the feature is installed. Items you add to a condition are only installed if the feature is installed and the condition is true. 3. In the lower left list box, select the key to contain the value you’re adding. 4.
Registry Page 3. Add the registry key and value to the installation. See Adding Registry Keys on page 145. 4. In the lower left list box, select the key that contains the value to remove. 5. In the lower right list box, double-click the value to remove. The Registry Details dialog appears. 6. Click the General tab. 7. From Operation, select Remove value during install. 8. Click OK.
Registry Page Importing and Exporting Registry Entries You can import registry files (.REG) into an installation. You can also export registry key settings from an installation to a .REG file. RegEdit 4.0 and 5.0 formats are supported for importing; RegEdit 4.0 formats are supported for exporting. To import a registry file: 1. Do one of the following: • Select Installation Expert > Registry page. From Current Feature, select a feature or condition.
Registry Page • In Installation Expert > Registry page, click Add > Key. • Double-click a registry value on the Registry page in Installation Expert or on the Components or Features tab in SetUp Editor. The Registry Details dialog appears. 2. Click the General tab. 3. Complete the dialog: • Operation Specify what operation will be applied to the key and its associated value. # Create/update key and value If the value exists, it is updated. If the key or value does not exist, it is created.
Registry Page 4. # Unexpanded string Variable names, such as %WIN%, are not expanded, allowing Windows NT system variables to be embedded. (REG_EXPAND_SZ) # Double word A 32-bit value in decimal notation. (REG_DWORD) # Binary / Hex A series of bytes in hexadecimal notation. The bytes should be entered without separating spaces or commas. (REG_BINARY) Example: AD30C0A94020A8FC4C0008. Click OK.
Registry Page You also can view shared registry resources in a report format. See Generating Shared Resource Reports on page 37. In order to view shared resources, you must be connected to a Software Manager database data source. For information on the Software Manager database, see About the Software Manager Database in the Software Manager Help. To view shared registry resources: 1.
INI Files Page INI Files Page Use the INI Files page to: ! Update the contents of an existing .INI file, such as System.ini. ! Create an .INI file and write installation properties to it. You cannot use this page to delete part or all of an .INI file. The left list box on this page represents the directory tree of the destination computer, and the right list box contains .INI entries you add to the installation. Use the right-click menu to expand or collapse folders and to hide or show empty folders.
INI Files Page 5. Complete the dialog; see below. 6. Click OK. The INI File entry appears in the right list box. To edit it, double-click its name. To delete it, use the right-click menu. From Setup Editor: 7. On the Components or Features tab, expand a component or feature. 8. To create a new folder for the INI file, right-click the INI Files icon or one of its subfolders and select New > Folder. Rename the folder. 9. Right-click a folder and select New > INI File. Note Add the .
Shortcuts Page Shortcuts Page The Shortcuts page lets you add, edit, and delete shortcuts for files in the installation, and add icons for shortcuts you will install. You can also create a shortcut for a file on the destination computer that’s not in the installation. Shortcuts for files that have associated shortcuts are created automatically if you select one of the scan advertising options from the Advertising Setting drop-down list in Wise Options. (Visual Studio integrated editor only.
Shortcuts Page # 3. Shortcut Name Enter a name for the shortcut. Click Next. If you created a shortcut for a file in the installation, the Shortcut File Selection dialog appears. 4. Select the installation file to create a shortcut for and click Next. Note Files added under the Duplicate Files icon in the Features or Components tabs of Setup Editor do not appear because you cannot add shortcuts for duplicate files. The Shortcut Destination Directory dialog appears. 5.
Shortcuts Page • Command Line This appears only if you created a command line shortcut. It contains the command line statement. • Dest. Directory This lists all pre-defined directories and directories you’ve created. Select the location for the shortcut on the destination computer, or click New Folder to create a new directory. • Arguments Enter command line arguments to append to the command line statement that is executed to launch the target of this shortcut.
Adding an Environment Variable Adding an Environment Variable You can add, edit, and delete environment variables and values to be set by the operating system on the destination computer. You can add environment variables from Installation Expert or Setup Editor. 1. Do one of the following: • Select Installation Expert > Environment Variables page. From Current Feature, select a feature or condition.
Adding File Associations Adding File Associations You can associate file extensions with executables to determine which application to launch when the end user double-clicks a file with a certain extension. You can associate file extensions with any executable file in an installation. File associations are a type of advertising and are stored in the registry. To add a file association: 1. Do one of the following: • Select Installation Expert > File Associations page.
Adding File Associations All relevant information for the extension you select is imported into the Extension Details, Command Verbs, and MIME Types tabs. To edit those tabs, double-click the file association name. Also see Advertising Icon on page 387. Determining Extension Settings Use the Extension Details tab to determine file association settings. 1. Click the Extension Details tab on the File Associations Details dialog. See Adding File Associations on page 158. 2.
Adding File Associations • Command Enter the command as it should appear on the right-click menu. This entry is added to the text strings on the Languages page and can be localized. See Translating an Installation on page 254. • Argument Enter command line options that will be passed to the executable file when the action is performed. The default (%1) is a Windows variable that holds the pathname of the file that was opened. 4. Click OK.
Services Page Services Page Use the Services page to define applications to be installed as a service under Windows NT, Windows 2000, or Windows XP. You also can start, stop, and delete services that are installed on the destination computer. For information on coding an application to run as a service, consult Microsoft developer documentation. Application files that can be installed as a service are: .EXE, .VXD, .SYS, or .386.
Services Page • Executable Displays the file you selected on the Select File dialog, which runs the service. • Arguments Enter any arguments to be passed to the service on the command line at startup. • Login Username, Password Enter the Windows NT or Windows 2000/Windows XP account information for the account the service is to run under. Example: .\Username or Domain\Username. • Load Order Group Enter the group that this service will be a part of. Groups are loaded alphabetically at startup.
Services Page 1. Do one of the following: • Select Installation Expert > Services page. From Current Feature, select a feature or condition. (Because any item you add must be assigned to a specific feature, you cannot add an item when All Features is selected.) If the service is not in this installation, select a feature with which to associate the control service action. Items you add to a feature are only installed on the destination computer if the feature is installed.
Adding an ODBC Item Adding an ODBC Item You can use Installation Expert or Setup Editor to define the ODBC (Open Data Base Connectivity) data sources, drivers, and translators to include in an installation. For information about ODBC, consult technical documentation provided by Microsoft. 1. Do one of the following: • Select Installation Expert > ODBC page. From Current Feature, select a feature or condition.
Adding an ODBC Item Setting ODBC Driver Details 1. Access the ODBC Driver Details dialog. See Adding an ODBC Item on page 164. 2. Complete the dialog: • Driver Name Enter a name for the driver, or click Import to import driver information from a saved driver file. If you click Import, the Select ODBC Driver dialog appears, which displays a list of ODBC drivers that are currently installed on your computer. • Driver .DLL Specify the path to the .DLL used for this driver. • Setup .
Chapter 7 Your Installation on the Destination Computer The Target System and User Interface page groups in Installation Expert, along with the Launch Conditions icon in Setup Editor > Product tab, let you determine how the installation behaves on the destination computer. Topics include: ! About System Requirements (setting minimum system requirements). ! Performing a System Search (searching the destination computer for specific items).
About System Requirements About System Requirements You can define system requirements for an installation in 2 different areas of Wise for Windows Installer: ! System Requirements page You can use a point-and-click interface to set requirements for the operating system, the Internet Explorer version, and screen attributes.
About System Requirements If the destination computer is running Windows 95, Windows 98, or Windows Me, the minimum system requirements specified under the Windows Version item are checked instead. Screen Resolution The minimum required screen resolution. Screen Colors The minimum required screen depth. 24 Million Colors corresponds to True Color in the Display Control Panel. Internet Explorer Version The minimum required version of Microsoft Internet Explorer.
About System Requirements To set basic requirements, use the System Requirements page; see Setting a Requirement on the System Requirements Page on page 167. To create new launch conditions and edit existing ones, use the Launch Conditions icon in Setup Editor > Product tab. To create a new launch condition: 1. In Setup Editor > Product tab, right-click the Launch Condition icon and select New > Launch Condition. The Launch Condition Details dialog appears. 2.
Performing a System Search Performing a System Search Use the System Search page to search the destination computer: ! To find a previous version of your application that wasn’t installed using Windows Installer technology. ! To find any files, directories, .INI files, registry entries, or components of a previous version of your application.
Performing a System Search # Search all fixed drives for a file Searches all permanent attached drives for the file. You determine how many levels down the search is performed by entering a search depth. This operation returns the entire pathname to the file. Example: C:\Program Files\Application\Application.exe. # Search for file: return full file name Searches a specific directory for a file, and returns a full pathname. (Example: C:\Program Files\Application\Application.exe.
Performing a System Search • Min. Size (Optional.) The file’s size must be equal or greater than this number. Leave both size fields blank to ignore the file size. • Max. Size (Optional.) The file’s size must be equal or less than this number. Leave both size fields blank to ignore the file size. • Languages (Optional.) To search for a file with a particular language ID, enter the language ID. To enter multiple languages, separate the language IDs with commas. 5.
Performing a System Search Properties icon on the Product tab, then you can select it from the list; otherwise enter a new property name (all uppercase). If you enter a new property name, and the search fails to find a match, the property value will be null and will be false if used in a condition. Operation Select the type of entry for the property: # Read directory name from INI file Use this only if the .INI information you are searching for is a directory path.
Performing a System Search Searching For a Registry Value On the System Search page, you can set up a search for a registry value on the destination computer. You can either search for a generic value, or do a special search that’s tailored specifically for a file path or directory path. 1. 2. Select Installation Expert > System Search page. Click Add at the right of the page and select Registry. The Read Registry Value dialog appears. 3. Complete the dialog: • Property Specify a property name.
Performing a System Search property to be displayed on the dialog. When you run the installation, the property you specified will hold the results of the search. If it is empty, the search failed. Searching For a Previously-Installed Component On the System Search page, you can set up a search for a component that was previously installed on the destination computer. The search looks for the component’s GUID in the registry to determine whether the component is installed.
Performing a System Search To test the search, add a text box on one of the dialogs in the installation. In the text box’s Control Text field, enter the property name (surrounded by brackets) that you assigned to this search. (Example: [MY_PROPERTY].) This causes the value of the property to be displayed on the dialog. When you run the installation, the property you specified will hold the results of the search. If it is empty, the search failed.
Setting Features for Installation Types Setting Features for Installation Types Use the Installation Types page to determine which features are installed when the end user selects Complete, Typical, or Custom on the Installation Type dialog. To display the Installation Type dialog to the end user during installation, you must mark its checkbox on the Dialogs page. Example: Suppose your application contains 3 features.
Setting Features for Installation Types Selected by default Description text Access key Default features 178
Chapter 8 Organizing Your Installation Into Releases You can create an installation that generates different installations for different releases of your application. You do this by creating and customizing releases within the installation. You can create releases that install different features, have different properties, have different output formats, and generate a Web-based installation. Note You can only create releases in a project file (.WSI).
About Releases About Releases Note This page is fully enabled in a .WSI only. In an .MSI or .MST, you cannot add or delete. The Releases page lets you define multiple releases for an installation, edit releases, and delete releases you’ve created. If you haven’t created additional releases for the installation, the Releases page lists only one release: Default.
About Releases • Release Name Enter a unique name that describes the release. Example: Standard_CD-ROM or Standard_Internet. This name appears on the Releases page. • .MSI File Name Name the installation file for this release. Do not include the directory name. Each release is saved in a separate .MSI. If you leave this blank, the release name defaults to the name of the .WSI with the extension .MSI.
About Releases Outputting a Multiple-Language Release Note This page is fully enabled in a .WSI only. In an .MSI or .MST, you cannot add or delete. Normally, when you compile an installation containing multiple languages, a separate .MSI or .MST is created for each language. However, you can create a single installation that contains multiple languages, and either automatically installs in the destination computer’s language or prompts the end user to select a language.
Customizing a Release Customizing a Release When you create a new release, it has the same properties, summary items, and features list as the Default release. The Release Settings page lets you customize a particular release by: ! Overriding the properties and summary items. These are set for the entire installation in Setup Editor > Product tab. ! Selecting the features to include in the release. Features are set for the entire installation in Installation Expert > Features page.
Customizing a Release 7. Click OK. The property appears in the list box. To edit it, double-click its name. Customizing Summary Items for a Release Note This page is enabled in a .WSI only. You can use the Release Settings page to override the value of an existing summary item or edit customized summary items. Example: Change the Comment Summary item to reflect that a particular release is a demo version rather than a full version.
Customizing a Release 4. To include a feature in this release, mark its checkbox. To exclude a feature, clear its checkbox. Sharing Settings Between Releases Note This page is enabled in a .WSI only. You can share settings from a release with other releases in the installation. After you initially share settings, the settings for the releases are linked. This means that any change you make to the release settings for any of the linked releases is applied to all other linked releases.
Customizing a Release Assumptions ! On the Features page, you have added a SaveAs feature with the appropriate resources for the default release. ! The SaveAs feature includes resources that let end users save files. ! On the Releases page, you have created a release named Demo. To create a sample demo release: 1. Select Installation Expert > Release Settings page. 2. From Current Release, select Demo. 3. Click the Properties icon. 4. Click Add at the right of the Release Settings page.
Setting Build Options for a Release Setting Build Options for a Release Note This page is fully enabled in a .WSI only. In an .MSI or .MST, you cannot add or delete. On the Build Options page, you can customize a release by selecting the format of output files and language options. 1. Select Installation Expert > Build Options page. 2. From Current Release, select a release. 3. Complete the build options listed below.
Setting Build Options for a Release Caution If you change the .EXE options after you edit the WiseScript on the Prerequisite Pages, you will lose all the changes you made to the script. ! Password Enter a password. The user installing the application is prompted to enter the password to initiate the installation. This password is the same for all users. You can protect only .EXEs with a password.
Adding Prerequisites to a Release Adding Prerequisites to a Release On the Prerequisites page, you select the Windows Installer and .NET Framework runtimes to pre-install, and you add prerequisite files to run before the main installation. Prerequisite files are usually .EXE or .MSI files, but there is no restriction on their type. Note The options on the Prerequisites page are disabled if Do not create an .EXE file is selected from .EXE Options on the Build Options page.
Adding Prerequisites to a Release If the .NET Framework includes a Windows Installer version that is later than the Windows Installer version you selected above, the later version is pre-installed. 4. Mark Delay Windows Installer runtime reboot until after product installation to delay the reboot to the end of the installation and minimize reboots for the end user. This is enabled only if one of the Windows Installer Runtime Version fields is set to 2.0 or later, or if a .
Adding Prerequisites to a Release The prerequisite file is added to the Prerequisites page. Note If the prerequisite file requires a reboot, you may need to edit the WiseScript to make the reboot run smoothly. We recommend adding 2 Pause scripts for 1000 milliseconds after a prerequisite that requires a reboot. This works better than 1 Pause script for 2000 milliseconds. By adding the Pause scripts, the WiseScript will not try to launch the next prerequisite while the computer is shutting down.
Adding Prerequisites to a Release The installation is saved and compiled and the WiseScript that creates the installation’s .EXE opens in your default WiseScript editor. See WiseScript Editing Tools on page 494. The name of the WiseScript file is the name of the installation file and the name of the current release separated by an underscore. (Example: If the installation file is Installation.wsi and the current release is Default, the name of the WiseScript file is Installation_Default.wse.
Creating a Clean Build Creating a Clean Build " Professional and Enterprise Editions only. Note This page is enabled in a .WSI only. Use the Clean Build page if you need to do the final build on a clean build computer. A clean build environment helps avoid virus contamination. Also, moving a build to a clean build computer will reveal whether some necessary files exist only on the developer’s computer. The clean build itself is a collection of files that are necessary to compile an installation project.
Creating a Clean Build • In the Wise editor: If you are using the Source Control menu for version control on the entire installation, select a different folder in source control to store the clean build. • In Visual Studio: If you are already storing the installation project in source control, select a different folder in source control to store the clean build. This completes the setup portion of the clean build process.
Creating Web-Based Installations With WebDeploy Creating Web-Based Installations With WebDeploy " Editions and Windows Installer version. Available in Professional and Enterprise Editions only. For best results with WebDeploy, the destination computer should have Windows Installer 2.0 or later. Note This page is enabled in a .WSI only. WebDeploy lets you create Web-based installations that minimize bandwidth requirements by downloading only the files needed for the installation.
Creating Web-Based Installations With WebDeploy This method is best used over a corporate intranet. Because the .MSI is run directly from the Web, if a self-repair or install-on-demand is needed, the end user must have immediate access to the original Web location of the .MSI. Create an .EXE that runs an external .MSI and runtimes, and an external .INI that contains download and installation information Use this method to change the download information dynamically, perhaps as a result of end user input.
Creating Web-Based Installations With WebDeploy The WebDeploy Process " Professional and Enterprise Editions only. The following diagram shows how the WebDeploy process works when you distribute an .EXE with an embedded .MSI over the Internet. Phase 1: Your Computer Your Web Server Package Distribution or FTP client When you develop the installation, you: Compile the installation to an .EXE that contains the .
Creating Web-Based Installations With WebDeploy ! For more efficient downloading, organize the installation into components. Only the components that are needed for the installation are downloaded. See Working With Components and Features on page 540. ! Make the installation download more efficiently. On the Installation Expert > Media page, display the Media Details dialog and select One Cab per component in the Cab Options field. See Adding a Media Item on page 202.
Creating Web-Based Installations With WebDeploy http://username:password@www.address.com/file_name.msi Click the Edit button next to each field to display a URL Settings dialog, which lets you enter the elements of the file location separately and then builds the full path from your entries. Note If you select the Create .EXE and .INI option, the password is stored in the .INI file. If you are concerned about the password being visible, select the Create a downloadable .
Creating Web-Based Installations With WebDeploy To upload a WebDeploy installation with Package Distribution: 1. To have the installation pre-install the Windows Installer runtime, set the following fields to determine which versions of the Windows Installer runtime file are uploaded by Package Distribution. Note On each of the following pages, select a release. • Build Options page: In the .EXE Options field, select one of the WebDeploy options.
Creating Web-Based Installations With WebDeploy Example: Upload Sample3.msi to http://www.Sample3.com/downloads 3. If the installation will pre-install any Windows Installer or .NET runtimes, use an FTP client to upload the following files: • If you specified a 9x Download URL on the WebDeploy page, upload the file InstMsi.exe to that Web address. • If you specified a NT Download URL on the WebDeploy page, upload the file InstMsiW.exe to that Web address. • If you specified a .
Setting Up Media for Distribution Setting Up Media for Distribution Note This page is fully enabled in a .WSI only. In an .MSI or .MST, you cannot add or delete. The Media page lets you prepare an installation for distribution. Here, you specify compression, the media’s size, holding directories, and how features and components are organized on the media. You set media options per release.
Setting Up Media for Distribution To add a media item: 1. Select Installation Expert > Media page. 2. From Current Release, select a release. 3. Click Add at the right of the Media page. The Media Details dialog appears. 4. In Media Name, describe the media item you’re setting up. Examples: Compressed Application Files or Uncompressed Tutorial. This name appears on the Media page. The media name must be unique within a release. 5.
Setting Up Media for Distribution This makes it easier to create a CD where some files are compressed and others are not. You can create one or more media items with different compression options but have them all placed on the same CD. You can also use this option to have one distribution medium (example: a CD) filled up before starting to place media items on a second or third distribution medium. See Example: Spanning an Installation Across Media and Sharing Media Size Information on page 207.
Setting Up Media for Distribution Note The .MSI file is always placed in the first directory in the list. To specify a destination directory: 1. Select Installation Expert > Media page. 2. From Current Release, select a release. 3. Double-click a media item. The Media Details dialog appears. 4. In the Media Destinations section, click Add. The Media Destination Details dialog appears. 5.
Setting Up Media for Distribution Examples: ! Suppose you want to have an uncompressed Readme file on your distribution media. In this case, you could create a media item called Uncompressed Readme. Then, from the list of components to include, you would select the Readme file’s component for inclusion in this media item. ! Suppose the installation includes a graphic feature with sample images, and you want to compress these images into an external .CAB file.
Setting Up Media for Distribution 3. Click Share at the right of the Media page. The Share Release dialog appears. 4. From Copy/Share Media Settings From, select . 5. Click OK. The link between the selected release and other releases is broken. The current settings of the releases are not changed, but changing settings for one release no longer affects the settings of other release.
Setting Up Media for Distribution 9. Click OK. 10. In the Media Destinations section, click Add again. The Media Destination Details dialog appears. Make the following entries for the second CD: • Destination Directory C:\My Installation\CD 2 • Volume Label CD Two • Disk Name CD 2 11. Click OK. 12. In the Include Features/Components list, click Add and select the features and components to compress. 13. Click OK. The next steps are for the second media item. 14. On the Media page, click Add.
Chapter 9 Advanced Installations Wise for Windows Installer lets you set advanced installation options and create special purpose installations such as installations for Web applications. Topics include: ! About Command Lines. ! Adding a Digital Signature to Your Installation. ! Creating an Installation for Microsoft SMS. ! Creating a .NET Installation When You Have the .NET Framework. ! Creating a .NET Installation Without the .NET Framework. ! About Web Installations.
About Command Lines About Command Lines Command lines change the behavior of an .EXE for different work environments and user requirements. You can work with two sets of command lines for installations: Command Lines You Can Apply to Installations at Runtime Command Lines You Can Apply to Wise for Windows Installer for Compiling Call MSIExec.EXE. Call WFWI.EXE. Are applied to Windows Installer installations at runtime.
About Command Lines /p name=value Set property values. The property name and value must immediately follow the /p. You can use as many property name and value switches as you like in a command line. Do not enter any spaces in the name=value construction, unless they are enclosed in double quotes. /o path Specifies the compiled output file. You cannot specify a relative path; specify an absolute path. The path must immediately follow the /o.
Adding a Digital Signature to Your Installation Adding a Digital Signature to Your Installation Use the Digital Signature page to add an Authenticode digital signature to an installation file so its integrity and authenticity can be verified. You must have a valid VeriSign commercial certificate to use this feature. For information about digital signatures, visit the VeriSign Web site at www.verisign.com and search for authenticode.
Creating an Installation for Microsoft SMS Creating an Installation for Microsoft SMS If an installation will be run in a Microsoft Systems Management Server (SMS) environment, you can have the installation create a status .MIF file in the Windows directory to describe the application. In order to use an installation in an SMS environment, you must also create a package definition file (.PDF or .SMS), which contains information about the installation.
Creating a .NET Installation When You Have the .NET Framework Creating a .NET Installation When You Have the .NET Framework " Windows Installer 2.0 or later only. The .NET Framework helps automate the process of building a .NET installation by extracting most of the assembly details from the assembly manifests and adding them to the installation. 1. Select Installation Expert > Product Details page. 2. In the Application Type field, select either .NET Application or Mixed (.NET and Win32).
Creating a .NET Installation Without the .NET Framework Creating a .NET Installation Without the .NET Framework " Windows Installer 2.0 or later only. You can build an installation for a .NET application even if you do not have the .NET Framework installed on your computer. Perhaps your company’s development computers have the .NET Framework, but the computer you use to build installations does not. If you do not have the .NET Framework, you must do manually what the .
Creating a .NET Installation Without the .NET Framework 6. If the destination computer’s operating system is not Windows XP, add support for the .NET Framework to the installation. On the Prerequisites page, select the desired release and then select the runtime from .NET Framework Runtime Version. For details, see Adding Prerequisites to a Release on page 189. 7. Finish building the installation as usual, then compile and distribute it.
About Web Installations About Web Installations " Professional and Enterprise Editions only. You can create an installation that installs Web resources to a Microsoft Internet Information Server (IIS) by using the Web Files page in Installation Expert. To learn about file-related functionality on the Web Files page, see Files or Web Files Page on page 121 and its subtopics.
About Web Installations Dynamic Editing of XML files The Dynamic Content tab appears for valid XML files, such as Web.config, that you add to the installation. Use it to edit the attributes in an XML file by substituting the value of Windows Installer properties at runtime. Gather the values of properties using the Custom Property Dialog below. See Editing XML Files During Installation on page 141.
About Web Installations Creating a Web Site " Professional and Enterprise Editions only. New Web sites you add appear under the Program Files directory by default. Microsoft Internet Information Server (IIS) supports the creation of new Web sites only on server operating systems, which excludes Windows 2000 Pro and Windows XP.
About Web Installations Creating a Virtual Directory " Professional and Enterprise Editions only. This section covers creating a virtual directory, converting an existing installation directory to a virtual directory, adding a directory from your computer as a virtual directory, and deleting a virtual directory. To create a virtual directory: 1. Select Installation Expert > Web Files page. If you don’t see the Web Files page, select All from the Page Views drop-down list. 2.
About Web Installations Note If this dialog contains a Web Dialogs button, then after you add all the Web resources for this virtual directory, return to this dialog and click the Web Dialogs button. Then follow the procedure in Setting Installation Options for a Web Installation on page 222. To add a directory from your computer as a virtual directory: 1. On the Web Files page, manually create a virtual directory with the name of the directory on your computer. 2.
About Web Installations 6. Select the new directory and click Details. A details dialog appears with several tabs. These tabs correspond to options in Microsoft Internet Information Server (IIS). 7. Set the options on the dialog. See IIS documentation for help on options. Also see Setting Details for Web Sites, Virtual Directories, and Web Folders on page 224. Setting Installation Options for a Web Installation " Professional and Enterprise Editions only.
About Web Installations • New Web Site Mark this to let end users install Web resources to a new Web site. However, even if you mark this, this will not be an available option if the operating system of the destination computer does not support the creation of new Web sites. Additional dialogs appear in this procedure if you mark this option. • Existing Web Site Mark this to let end users install Web resources to an existing Web site. They will see a list of existing Web sites to choose from.
About Web Installations subsequent virtual directories with the Virtual Directory Configuration dialog again. Otherwise, a second Web Site Configuration dialog appears. 9. (Optional) On the Web Site Configuration dialog, move the IIS dialogs. 10. Click Next. The Finish dialog appears. 11. Click Finish. The only way to change what options display to the end user is to run the Web Installation Configuration wizard again.
About Web Installations Another example is the Enable Default Content Page checkbox on the Documents tab (IIS 6.0). If it is marked on the Web server before installation, and you leave it unmarked in your Web site settings, it will remain marked on the server after installation.
Configuring a Microsoft SQL Server During Installation Configuring a Microsoft SQL Server During Installation " Professional and Enterprise Editions only. Use the SQL Server Scripts page to create or configure Microsoft SQL Server databases. You might use this page if the application you are installing is a database application and depends on certain database content and configuration. This page eliminates the need to require end users to configure databases manually.
Configuring a Microsoft SQL Server During Installation Tips on Using the SQL Server Scripts Page ! Add the SQL Connection dialog to an installation to create a valid connection string for a SQL Server located anywhere on the network of the destination computer. See About the SQL Connection Dialog on page 449. ! Uninstall won’t roll back the changes performed by the SQL statements. ! Databases are connected to and configured through the ODBC driver on the destination computer.
Configuring a Microsoft SQL Server During Installation generated. For this to work, the destination computer must have access to the same database. 3. Click OK. Specifying SQL Statements " Professional and Enterprise Editions only. 1. Click the Statements tab on the SQL Script Details dialog. See Configuring a Microsoft SQL Server During Installation on page 226. 2. To import a file containing SQL statements, click Import SQL File and specify a .SQL or .TXT file that contains SQL statements.
Configuring a Microsoft SQL Server During Installation Note Error checking or debugging is not available for statements that you type or import. Make sure the SQL code you enter is well-tested before deployment. If errors occur during installation, the end user will see SQL error dialogs. Specifying Replacements in SQL Statements " Professional and Enterprise Editions only. You can specify text strings to be found and replaced within the SQL statements during installation. 1.
Importing .NET Framework Security Settings Importing .NET Framework Security Settings " Professional and Enterprise Editions only. Use the .NET Framework Security page to import .NET Framework security settings from your computer into an installation for a .NET application that you are deploying using no-touch deployment. No-touch deployment lets system administrators deploy .NET desktop applications via a remote Web server without altering the end user’s registry or shared system components.
Importing .NET Framework Security Settings Items you add to a feature are only installed on the destination computer if the feature is installed. Items you add to a condition are only installed if the feature is installed and the condition is true. 3. 4. In the upper-left list box, navigate to and select the code group that contains the security settings. Click Add Code Group to add the code group to the installation. The code group appears in bold type in the lower-left pane.
MTS/COM+ Page MTS/COM+ Page " Professional and Enterprise Editions only. Use the MTS/COM+ page to add MTS or COM+ application packages to an installation. The MTS/COM+ page is intended for software developers who know the computer names of the servers that contain MTS or COM+ server applications. Both MTS (Microsoft Transaction Server) and COM+ are steps in the evolution of the Component Object Model (COM) technology.
MTS/COM+ Page 4. Complete the dialog: • Application Name Specify the MTS/COM+ application. You can only select from currently installed applications. • GUID (Read-only.) This contains the GUID of the MTS/COM+ application that you select. • Installation Type Select the installation type: # Client Installs the client portion of the MTS/COM+ application. This installation type requires a remote server name.
Chapter 10 Mobile Devices " Professional and Enterprise Editions only. The Mobile Devices page lets you create and configure installations that support installation to mobile devices: Pocket PC, Smartphone, and Palm. The Mobile Device Package Editor tool lets you edit existing .CABs or quickly create a simple new .CAB. Topics include: ! Mobile Devices Page Compared to Mobile Device Package Editor. ! About the Mobile Devices Page. ! About Mobile Device Package Editor.
Mobile Devices Page Compared to Mobile Device Package Editor Mobile Devices Page Compared to Mobile Device Package Editor " Professional and Enterprise Editions only. Wise for Windows Installer has the following 2 features for installing your application to mobile devices: Mobile Devices Page Use this page in Installation Expert to add mobile device support to an .MSI-based installation. Using the Mobile Devices page, you can: ! Add support for multiple mobile device platforms and processors.
About the Mobile Devices Page About the Mobile Devices Page " Professional and Enterprise Editions only. Note To see the Mobile Devices page, select one of these views from the Page Views drop-down list in Installation Expert: All, Palm Application, Pocket PC Application, Smartphone Application. When you add support on the Mobile Devices page, the installation that you create is an .MSI-based installation, which can only be installed on a desktop computer. However, the .
About Mobile Device Package Editor About Mobile Device Package Editor " Professional and Enterprise Editions only. The Mobile Device Package Editor tool is primarily intended for opening and editing an existing .CAB file. Use it to make minor changes to an existing .CAB, including changes to files, registry entries, and shortcuts. If you open an existing .CAB, you cannot change the supported platforms or processors for the .CAB or any individual resource within the .CAB.
Pocket PC and Smartphone Installations Pocket PC and Smartphone Installations " Professional and Enterprise Editions only. On the Mobile Devices page, you can add a separate installation whose target is a Pocket PC or Smartphone mobile device. The instructions for creating a Pocket PC and Smartphone installation are combined, because the process for each is nearly the same. Palm installations are discussed in Palm OS Installations on page 252.
Pocket PC and Smartphone Installations Uninstall of the mobile device application is controlled by the mobile device and ActiveSync. Uninstalling the application from the desktop computer has no affect on the application that is installed on the Pocket PC or Smartphone device. Processor and Platform Support for Pocket PC " Professional and Enterprise Editions only. When you create a Pocket PC mobile device installation, you can specify which platforms and processors you plan to support.
Pocket PC and Smartphone Installations • Shortcuts. See Setting Shortcuts for a Mobile Device on page 250. • Desktop. See Setting Desktop Computer Details for a Mobile Device Installation on page 251. To edit the mobile device entry, select it and click Details. After you create a mobile device entry, you might notice changes throughout Installation Expert, such as files added on the Files page, a shortcut on the Shortcuts page, and new custom actions added to MSI Script.
Setting Application Information for a Mobile Device Setting Application Information for a Mobile Device " 1. Professional and Enterprise Editions only. Do one of the following to access the Application Information dialog: • Step through the Pocket PC or Smartphone wizard. • Double-click a Mobile Device entry on the Mobile Device page and click the Application Information tab. • Select this page in the Mobile Device Package Editor tool. See Creating a Pocket PC or Smartphone Installation on page 239.
Setting Platform Support for a Mobile Device Setting Platform Support for a Mobile Device " 1. Professional and Enterprise Editions only. Do one of the following to access the Platform Support dialog: • Step through the Pocket PC wizard. • Double-click a Mobile Device entry on the Mobile Device page and click the Platform Support tab. • Select this page in the Mobile Device Package Editor tool. See Creating a Pocket PC or Smartphone Installation on page 239.
Setting Platform Support for a Mobile Device • .NET Compact Framework Runtime Version Select a version of the .NET Compact Framework. 3. Click OK. Note When the installation .MSI is run on a desktop computer, the installation queries the connected mobile device for its platform and processor. It runs the .CAB file that has specific support for that system.
Setting Platform Information for a Mobile Device Setting Platform Information for a Mobile Device " 1. Professional and Enterprise Editions only. Do one of the following to access the Platform Information dialog: • Step through the Pocket PC wizard. • Double-click a Mobile Device entry on the Mobile Device page and click the Platform Information tab. • Select this page in the Mobile Device Package Editor tool. See Creating a Pocket PC or Smartphone Installation on page 239.
Setting Files for a Mobile Device Setting Files for a Mobile Device " 1. Professional and Enterprise Editions only. Do one of the following to access the Files dialog: • Step through the Pocket PC or Smartphone wizard. • Double-click a Mobile Device entry on the Mobile Device page and click the Files tab. • Select this page in the Mobile Device Package Editor tool. See Creating a Pocket PC or Smartphone Installation on page 239. See About Mobile Device Package Editor on page 237.
Editing Details for Mobile Device Files Editing Details for Mobile Device Files " 1. Professional and Enterprise Editions only. Do one of the following to access the Files dialog: • Step through the Pocket PC or Smartphone wizard. • Double-click a Mobile Device entry on the Mobile Device page and click the Files tab. • Select this page in the Mobile Device Package Editor tool. See Creating a Pocket PC or Smartphone Installation on page 239. See About Mobile Device Package Editor on page 237. 2.
Editing Details for Mobile Device Files Note The options below are available for Pocket PC installations only. • Platform Supported Select the platform with which this file is compatible. If you select a specific platform, then this file is isolated into a .CAB file for that particular platform. If you select All, the file is installed to all of the platforms you selected for Platform Support. • Processor Supported Select the processor with which this file is compatible.
Setting Registry for a Mobile Device Setting Registry for a Mobile Device " 1. Professional and Enterprise Editions only. Do one of the following to access the Registry dialog: • Step through the Pocket PC or Smartphone wizard. • Double-click a Mobile Device entry on the Mobile Device page and click the Registry tab. • Select this page in the Mobile Device Package Editor tool. See Creating a Pocket PC or Smartphone Installation on page 239. See About Mobile Device Package Editor on page 237.
Setting Registry for a Mobile Device Note The options below are disabled if you opened an existing .CAB in Mobile Device Package Editor. You can only specify processor and platform support when you select File menu > New to start an installation. Note The options below are available for Pocket PC installations only. • Platform Supported Select the platform on which this registry entry should be installed. If you select a specific platform, then this registry entry will be isolated into a .
Setting Shortcuts for a Mobile Device Setting Shortcuts for a Mobile Device " 1. Professional and Enterprise Editions only. Do one of the following to access the Shortcuts dialog: • Step through the Pocket PC or Smartphone wizard. • Double-click a Mobile Device entry on the Mobile Device page and click the Shortcuts tab. • Select this page in the Mobile Device Package Editor tool. See Creating a Pocket PC or Smartphone Installation on page 239. See About Mobile Device Package Editor on page 237. 2.
Setting Desktop Computer Details for a Mobile Device Installation Setting Desktop Computer Details for a Mobile Device Installation " Professional and Enterprise Editions only. Use the Desktop Computer dialog to set options that determine how the mobile device installation is stored and run on the desktop computer. It is important to understand that with a mobile device installation, there are 2 separate installations that take place; see How a Pocket PC or Smartphone Installation Works on page 238. 1.
Palm OS Installations Palm OS Installations " Professional and Enterprise Editions only. Use the Mobile Devices page to create an installation for devices running Palm OS. If you add a Palm OS application to an installation and there are multiple Palm users on the target computer, then an additional dialog appears during installation if the user selects Custom on the Installation Type Dialog.
Palm OS Installations • Install File to Palm “Add-on” Folder During Installation The Add-on directory is a temporary holding area for Palm applications. When an end user opens the Palm Desktop software and uses the Install Tool to add a new application to the Palm device, the contents of this directory are displayed first. This lets end users manually install software to the Palm device and gives all Palm users of the desktop computer access to the application.
Chapter 11 Translating an Installation You can translate the default dialogs in an installation into any language. Wise for Windows Installer contains 5 pre-translated languages in addition to English; the optional Language Pack contains translations for 20 additional languages. You can add any language that is not already pre-translated.
About the Languages Page About the Languages Page The Languages page displays pre-translated languages. Pre-translated languages contain translations for all default text in the installation’s user interface elements. Examples: error messages; disk prompts; text and controls on dialogs; descriptions or names for launch conditions, features, or shortcuts; property values, file names, and directory names. Use the Languages page to: ! Translate an installation into one or more languages.
About the Languages Page Additional Translation Options You can create a multiple-language installation that installs in the destination computer’s language or prompts the end user to select a language. For details, see Outputting a Multiple-Language Release on page 182. A Share option makes it easy to translate several releases into the same language or set of languages, with the same language settings. See Sharing Language Settings Between Releases on page 258.
About the Languages Page installation file is named Sample, a file named Sample_German.msi is created during compile. If you specify an .MST file instead of an .MSI, this language is compiled to a language transform. See Creating a Language Transform on page 257. • Codepage, Language ID Leave the defaults in these fields. You typically only change these fields when you define a new language. • Default release language (.WSI files only.
About the Languages Page If you specify an .MSI file instead of an .MST, this language is compiled to an installation database. See Creating a Translated .MSI on page 256. 6. Leave the defaults in Codepage and Language ID. You typically only change these fields when you define a new language. The Default release language checkbox is disabled when you specify an .MST as the destination file. 7. Click OK. 8. If needed, complete the Language Details dialog for any other languages you marked.
About the Languages Page Removing a Language from an Installation You can disable a language in an installation. This means the installation still contains the translated strings for the disabled language but the installation is not compiled to that language. You also can delete a language entirely from an installation. This means the language is removed from the Languages page and its translated strings are deleted from the installation.
Defining and Translating Into Additional Languages Defining and Translating Into Additional Languages If the language you need is not one of the 25 pre-translated languages, you can add it to the Languages page and add translated text for that language. Then you can translate installations into the new language. Example: Suppose you want to translate an installation into Swiss French. However, that language is not included in the standard product or the optional Language Pack.
Defining and Translating Into Additional Languages The Specify Language Details dialog appears. 2. Complete the dialog. The information you need to enter depends on what you plan to do; for details, see the topics listed in the next step. Then click Next. The Export/Import Text Strings for Language dialog appears. 3. Mark one of the following options: • Export Export all text strings to a file for translation into this new language. This is the option most typically used.
Defining and Translating Into Additional Languages • Language ID Specify only one language ID for the language you are adding. Windows Installer supports only one language in this field. See Language IDs on page 277 or visit msdn.microsoft.com for a complete list of language IDs. • Default release language (.WSI files only.) Mark this to use this language as the default language for this release. During compile, the default release language overrides the Default language on the Language menu.
Defining and Translating Into Additional Languages to define the language settings and import the text strings at the same time. See Importing All Text Strings With the New Language Wizard on page 263. Note In .TXT files, if tab characters for one or more text strings are added or deleted during translation, the text strings cannot be imported.
Defining and Translating Into Additional Languages To import all text strings with the New Language wizard: 1. Select Installation Expert > Languages page. 2. From Current Release, select a release. 3. Click Add at the right of the page. The New Language wizard appears with the Specify Language Details dialog. 4. Complete the dialog: • Language Name Enter a name for the new language. • Destination File (Optional.) Specify the full pathname for the translated installation file. You can create an .
Translating Text Strings You’ve Added or Changed Translating Text Strings You’ve Added or Changed When you add or change any user interface elements in an installation, you must translate those changes if you want them to appear in another language. Examples: error messages; disk prompts; text and controls on dialogs; descriptions or names for launch conditions, features, or shortcuts; property values, file names, and directory names.
Translating Text Strings You’ve Added or Changed You can use the Language Strings dialog on the Languages page to keep track of changed and exported text strings. See Keeping Track of Changed Text Strings on page 274. Exporting Selected Text Strings to a File Export selected text strings when you add or change text strings in an installation that is translated to another language.
Translating Text Strings You’ve Added or Changed The text strings are exported to the file you specified, which you can send to a translator. When you receive the translated file from the translator, you import the text strings into the installation. See Importing Selected Text Strings From a File.
Translating Text Strings You’ve Added or Changed Example: Suppose you have translated an installation to German. Then you add a Cancel button to an existing dialog. You already know the German translation for “Cancel” because other dialogs contain a Cancel button. In this case, you don’t need to export, translate, and import the changed string; you can change the text for the new Cancel button. You have 2 options for translating changed text: ! Translate specific text in the Language Strings dialog.
Translating Text Strings You’ve Added or Changed You can observe the change in the Language Strings dialog. Similarly, you can change translated text in the Language Strings dialog, then observe the change in Installation Expert or Setup Editor. See Translating Text on the Language Strings Dialog on page 268. Tables and Columns That Contain Text Strings You Can Translate You can edit the strings in Setup Editor > Tables tab, in other Setup Editor tabs, or in Installation Expert.
Resizing Dialog Controls After Translation Resizing Dialog Controls After Translation Because some languages require more space than others, you might need to resize dialog controls (examples: buttons and text boxes) to accommodate text expansion. 1. From the Language menu, select a language. To resize dialog controls across all languages, select the Default language. 2. Select Setup Editor > Dialogs tab. 3. Click the dialog to change. 4. Select a dialog control and resize it.
About the Language Menu About the Language Menu The Language menu lists all languages that have text translated in the installation. Use the Language menu to display translatable items in another language. Examples: error messages; disk prompts; text and controls on dialogs; descriptions or names for launch conditions, features, or shortcuts; property values, file names, and directory names.
About the Language Menu 6. Double-click the language name to display the Language Details dialog. 7. Mark Default release language and click OK. 8. Click Compile. 9. In the Save As dialog that appears, • Navigate to the Templates subdirectory and enter a file name. The location of the Templates subdirectory varies. See Where are Installation Resources Stored? on page 32. • From Save as Type, select Installer Projects (*.wsi). 10. Click Save. The .WSI is saved and then is compiled to an .MSI.
About the Language Menu 9. Select Build menu > Compile to create an .MSI. 10. Copy the .MSI file to the Templates\File directory. The location of the Templates directory varies. See Where are Installation Resources Stored? on page 32. 11. If you prefer to create a .WSI template, rename the file’s extension. If you have added files to the template, use MSI to WSI Conversion to create the .WSI template. 12. To test the new template, select File menu > New > File. The New Project dialog appears. 13.
About the Language Strings Dialog About the Language Strings Dialog The Language Strings dialog, which appears when you click the Strings button at the right of the Installation Expert > Languages page, displays all translated and default text strings side by side. Use the Language Strings dialog to translate strings and keep track of changed text strings. Columns on the Language Strings Dialog ! Translated Text Lists all text strings in the selected language.
About the Language Strings Dialog ! Formatting for the corresponding text string in the resource or text file was changed. (Example: This can happen if a tab in a text file was deleted or moved.) Try to reformat the resource or text file and then import it again. ! When you imported, you chose to compare current strings with original strings, and you’ve made changes to the strings in the interim. In this case, export changed text strings again. Translate the strings that have changed, then import them.
What Pre-Translated Languages Are Available? What Pre-Translated Languages Are Available? Pre-translated text strings let you instantly translate an installation into the following languages: French German Italian Portuguese Spanish The optional Language Pack lets you select from these additional pre-translated languages.
Language IDs Language IDs Windows Installer uses language IDs to determine whether the destination computer supports the language that is used for the installation dialogs. Example: If you create an installation with the language ID for Greek, that installation only runs on a computer with Greek fonts. Language IDs and Locale Codes for Common Languages For additional language codes, search for “Table of Language Identifiers” and “Language Code and Scripts” in the MSDN Library (msdn.microsoft.com/library).
Language IDs Language Sublanguage ID (decimal notation) Script Locale Language Code Italian Italian (Standard) 1040 Latin 1 ITA Italian Swiss 2064 Latin 1 ITS Norwegian Norwegian (Bokmal) 1044 Latin 1 NOR Norwegian Norwegian (Nynorsk) 2068 Latin 1 NON 1045 Latin 2 PLK Polish Portuguese Portuguese (Brazilian) 1046 Latin 1 PTB Portuguese Portuguese (Standard) 2070 Latin 1 PTG Russian 1049 Cyrillic RUS Slovak 1051 Latin 2 SKY Spanish Mexican 2058 Latin 1 ESM
Chapter 12 Distributing an Installation When you complete and compile an installation and are ready to deploy it, you can: ! Use Package Distribution to distribute an installation to disk, to the network, or to an FTP server for deployment to end users. ! Use Package Distribution to perform an administrative installation, which lets end users install from a network. ! Use WiseUpdate to configure your application for automatic updating.
Package Distribution Package Distribution Use Package Distribution to deploy or share a package by: ! Copying an Installation to the Share Point Directory. (Enterprise Edition only.) ! Copying an Installation to a Network Directory on page 282. ! Copying an Installation to an FTP Server on page 282. ! Performing an Administrative Installation on page 283. ! Copying an Installation to Removable Media on page 284.
Package Distribution The Welcome dialog appears. 2. If you are in a .WSI that contains multiple releases, a drop-down list appears. Select a release. 3. Mark Distribute to share point directory. 4. Click Next. If necessary, the installation file is saved and compiled. The Distribute to share point directory dialog appears. 5. Share Point (read-only) displays the share point directory to which the installation will be copied. It defaults to the share point directory that is specified in Wise Options.
Package Distribution The installation or merge module is copied to the share point directory. From there, it can be imported into the Software Manager database through Software Manager. See Importing From the Share Point Directory in the Software Manager Help.
Package Distribution 4. Click Next. If necessary, the installation file is saved and compiled. The FTP Server dialog appears. 5. Complete the dialog: • FTP Server Address The address of the FTP server to transfer the package files to. Example: ftp.server.com. • FTP Logon Name A valid logon name for this FTP server. The logon name must have write access to the directory to transfer files to. • FTP Logon Password A valid password.
Package Distribution • Use Short File Names Mark this if you are copying the administrative installation to a location that does not support long file names. This sets the SHORTFILENAMES property, causing all file names and directories in the administrative installation to be shortened to their 8.3 equivalent names. See SHORTFILENAMES Property in the Windows Installer SDK help. 6. Click Finish. An executable version of the package is copied to the directory you specified.
Package Distribution • Setup Filename Enter the name for the final installation file. You do not need to enter an extension. If you leave this blank, the final installation file is named the same as the currently-open installation file. • Erase Disk Before File Copy Mark this to erase the target disk before copying the installation onto it. 8. Click Finish. The installation is copied to the media. You are prompted to insert new media as necessary.
WiseUpdate WiseUpdate " Professional and Enterprise Editions only. WiseUpdate offers an easy method for updating your application on your end users’ computers, ensuring that end users are always working with the most current version of your application. Based on settings you specify on the WiseUpdate page, WiseUpdate installs a small client application along with your application.
WiseUpdate The WiseUpdate Process " Professional and Enterprise Editions only. Phase 1: Your Computer When you first use WiseUpdate, you: 1. Develop the installation 2. Configure WiseUpdate and specify: • Location of updates on the Web server • Current version of the application (FTP) 3.
WiseUpdate Using WiseUpdate in an Installation " Professional and Enterprise Editions only. To use WiseUpdate’ effectively, you must use it in 2 or more successive versions of your application. Using it in one version of your application only enables that version to check for later versions over the Internet. Process for Using WiseUpdate Effectively 1. Select Installation Expert > WiseUpdate page. 2. Mark Include WiseUpdate Client. This causes WiseUpdate Client, a small executable file (WiseUpdt.
WiseUpdate The first time you configure WiseUpdate, you enable that version to check for later versions over the Internet. To enable the Internet updating capability, you must use WiseUpdate for each successive version of your application. 1. Select Installation Expert > WiseUpdate page. 2. Mark Include WiseUpdate Client. 3. Complete the page: • Host Address Enter the Web server address where you plan to store updated installation files. (Example: www.company.com.
WiseUpdate • Alternate Web Page Enter a URL to direct the end user to if WiseUpdate Client cannot check for updates or download the installation files. You might direct the end user to a Web page that contains technical support information, upgrade information, or a discussion of possible problems. • Start Menu Icon This is enabled when you mark the Add client to StartUp group checkbox below. Enter a name for a shortcut to be created in the Startup group of the destination computer’s Windows Start menu.
WiseUpdate ! The WiseUpdate update file, which specifies the current version of the application, the URL to the installation files, and the URL to the Readme. See About the WiseUpdate Update File on page 290. Because FTP and HTTP are different protocols controlled by different servers, the connection information you entered on the WiseUpdate page might differ from the information you enter in Package Distribution.
WiseUpdate Use an FTP client to upload the following items to the Host Address and Host Directory you specified on the WiseUpdate page: ! The compiled installation file or files. ! An optional Readme file. ! The WiseUpdate update file, which specifies the current version of the application, the URL to the installation files, and the URL to the Readme. See About the WiseUpdate Update File on page 290.
WiseUpdate 2. On the testing computer, open your application’s installation directory and doubleclick the file WiseUpdt.exe. Then click Next. Because the version on the Web server is now later than the version on the testing computer, WiseUpdate Client displays the Readme file and then displays an option to download and run the installation. 3.
WiseUpdate WiseUpdate Tips " Professional and Enterprise Editions only. Can WiseUpdate be used with WebDeploy? Yes. Make sure that update installations you release are formatted as upgrades (use the Upgrades page). You cannot use WebDeploy to run patch files (.MSP). WebDeploy embeds connection information into the .EXE of the .MSI/.EXE pair, so that the .EXE can launch the .MSI from a location on the Web.
WiseUpdate ! The Product Version field on the Upload WiseUpdate Information dialog of Package Distribution sets the version stored in the update file on the FTP server. Typically, all 3 of these fields should have the same version number, but you can change the versions to force upgrades. Troubleshooting WiseUpdate " Professional and Enterprise Editions only. If you encounter problems with WiseUpdate during testing or after deploying your application, check the following suggestions.
Chapter 13 Upgrading Applications Windows Installer provides 2 main methods for upgrading installations: patching and upgrading. You can also have the end user upgrade by uninstalling and then reinstalling, although this method is not recommended. You can create upgrades and patches for installations using the UpgradeSync tool, Patch Creation tool, and the Upgrades page. Topics include: ! Preparing for Software Updates. ! UpgradeSync (a tool that improves the quality of patches). ! Patches.
Preparing for Software Updates Preparing for Software Updates Preparing for updates starts when you ship the first version of your application. Use the following steps to prepare for a software update: 1. Archive the Shipping Version of the .MSI on page 297. 2. Determine the Form of the Update on page 297. 3. Determine the Product Code and Product Version on page 298. 4. Check the Installation With UpgradeSync on page 298. Archive the Shipping Version of the .
Preparing for Software Updates ! Are created on the Upgrades page; see Upgrades on page 311. About Reinstalls ! Are required by default if you don’t provide for another method of updating, such as a patch or upgrade. Reinstalls are forced by the operating system if the version and the product code are the same. ! If the product code is changed, then the updated application can be installed alongside the original application, or can inadvertently be installed over the original application.
Preparing for Software Updates previous version of the installation and prepares the current installation for a patch or upgrade. Also see UpgradeSync on page 300.
UpgradeSync UpgradeSync Using UpgradeSync is one of the steps in preparing software for updates; see Preparing for Software Updates on page 297. Upgrade Sync compares your current installation to the previous version of the installation, and does the following to prepare the current installation for a patch or upgrade: ! Changes the PackageCode, ProductCode, and ProductVersion properties if necessary. ! Aligns component GUIDS.
UpgradeSync • Minor Upgrade Select this to ship this installation as a patch or reinstall. Minor upgrades generally contain changes such as new or removed features, files, or other items. This option changes the package code and forces you to increment the product version of the current installation if it is the same as the previous .MSI’s product version. • Major Upgrade Select this to ship the current installation as an upgrade.
Patches Patches Use Patch Creation to create a Windows Installer patch file (.MSP) that updates installed versions of a Windows Installer-based application. A patch file can update one or several previous versions. Unlike full installations, a patch installation contains only the information necessary to update an installed version of the application. Patch Creation uses 3 files from the Microsoft Windows Installer SDK: PATCHWIZ.DLL, MSPATCHC.DLL, and MAKECAB.EXE.
Patches Note This feature was developed and tested with the RC1 build of Windows Installer 3.0; unexpected results may occur with the final version of the runtime. As of this release of Wise for Windows Installer, Microsoft had not released the final version of Windows Installer 3.0, therefore, it is not included in this product. To use this feature, obtain an RC or production build of Windows Installer 3.0 from Microsoft and install it on your computer.
Patches Patch Updates Family Sequence D Application1 100 3 Application2 200 2 These patches would be applied to the applications in this order: ! Family 100: A, C, D ! Family 200: B, D Note This feature was developed and tested with the RC1 build of Windows Installer 3.0; unexpected results may occur with the final version of the runtime. As of this release of Wise for Windows Installer, Microsoft had not released the final version of Windows Installer 3.
Patches The patch creation process, which is executed by the Microsoft-provided file PATCHWIZ.DLL, operates on uncompressed files only. Typically, the files in an .MSI are compressed. The administrative installation places all the files of the installation in a temporary directory. After administrative installation finishes, the Specify Previous Versions dialog appears again. Note Microsoft’s Windows Installer engine is called to perform the administrative installation.
Patches # File Sequence Start, Disk ID Start The file sequence number indicates which files in the File table are located on a particular source disk. The disk ID number indicates how many media entries there are in the Media table. For patches, these numbers must be at least 1 greater than the corresponding numbers in the most recent patch or .MSI for this application installation. To specify these numbers, browse to the most recent patch file created for this installation.
Patches • Ignore Missing files while making patch Mark this if you have files that you do not want to put in the patch, such as a ReadMe file. This lets you delete files from the .MSI without receiving an error during patch file creation. • Match Product Code Mark this if this patch should be installed only if the product code of the installed application on the destination computer matches the product code of the current installation. The product code is located on the Product Details page.
Patches If any of these patches are found on the destination computer and are registered with Windows Installer, they are unregistered and their patch transforms are removed from the list of transforms associated with the application. This lets you apply a patch to an original installation without having applied any intermediate patches. Example: If this patch represents Service Pack 2, setting this field lets end users upgrade to Service Pack 2 even if they did not install Service Pack 1.
Patches Note This feature was developed and tested with the RC1 build of Windows Installer 3.0; unexpected results may occur with the final version of the runtime. As of this release of Wise for Windows Installer, Microsoft had not released the final version of Windows Installer 3.0, therefore, it is not included in this product. To use this feature, obtain an RC or production build of Windows Installer 3.0 from Microsoft and install it on your computer.
Patches • Make This Patch Removable Mark this to make this patch removable through Add/Remove Programs. When you make a patch removable, enter values for the following meta data, which is used by Add/Remove programs. Only the Classification is required. • Description Enter a brief description of the patch that will appear in Add/Remove programs. • DisplayName Enter a name for the patch that will appear in Add/Remove Programs. • Classification (Required.
Upgrades Upgrades Use the Upgrades page to create an installation that upgrades previous versions of an application. During an upgrade, the installation searches the destination computer for applications that can be upgraded, and upon detection, retrieves its version information from the registry. The installation uses this information along with the criteria on the Upgrades page to determine whether the installed application should be upgraded.
Upgrades • Minimum Version Enter the minimum version that should be upgraded by this installation. The version you enter here is not upgraded unless you mark the Include minimum version in range checkbox. • Include minimum version in range Mark this to include the minimum version as a valid upgrade. If you clear this, only versions greater than the minimum version are upgraded. • Maximum Version Enter the maximum version that should be upgraded by this installation.
Upgrades • Migrate feature states Mark this to retain the feature states of the installed application during the upgrade. Example: If the end user chose not to install a feature, such as a spell checker, in the initial installation, the upgrade will not install it either. • Do not uninstall previous version Mark this to keep the previous version of the application on the destination computer when the upgrade is installed. This lets the end user have 2 versions of the application installed. 4. Click OK.
Chapter 14 Working With Source Paths You might find that you need to work with source paths during installation development. Project files (.WSI) reference files you add to the installation by their source path. Each time you compile, the files are copied from the source path to the .MSI. Topics include: ! Using Source Control. (Not available in the Visual Studio integrated editor.) ! About Path Variables. ! Changing Source Paths in an Installation.
Using Source Control Using Source Control " Not available in the Visual Studio integrated editor. Visual Studio .NET contains built-in source control functionality. Source code control is the control, tracking, and recording of all changes made to a set of source code files. Various commercial and open-source software applications, such as Microsoft Visual SourceSafe, act as source code control systems (SCCS).
Using Source Control See Saving an Installation as XML on page 93. Adding an Installation to Source Control " Not available in the Visual Studio integrated editor. Visual Studio .NET contains built-in source control functionality. To use source control, you must have a source code control system (SCCS) installed on your computer. For information about source control, see Using Source Control on page 315. 1. If the commands in the Source Control menu are disabled, do the following: • 2.
Using Source Control Note To avoid moving files, cancel this operation, remove this project from source control, and move the installation file into the same directory tree as its source files. 5. Click OK. After the installation is added to your SCCS, use the options in the Source Control menu to coordinate file transactions between your computer and the SCCS. Whenever you add files to the installation, repeat the process above to add them to your SCCS.
Using Source Control Checking Files Into Source Control " Not available in the Visual Studio integrated editor. You can only use this feature if you’ve added the current installation to your source code control system (SCCS). If you check a file in, then attempt to work on it, you are prompted to save it with a new name because the file is locked for changes unless it is checked out first. 1. Select Source Control menu > Check In.
Using Source Control Getting Latest Version of Files " Not available in the Visual Studio integrated editor. You can only use this feature if you’ve added the current installation to your source code control system (SCCS). 1. Select Source Control menu > Get Latest Version. The Get Latest Version dialog appears, listing all files in the installation. 2. Mark the checkboxes of the files to get from source control and click OK.
Using Source Control Using Source Control on page 315 Adding an Installation to Source Control on page 316 Showing History of the Installation File " Not available in the Visual Studio integrated editor. You can only use this feature if you’ve added the current installation to your source code control system (SCCS). You can view the history of an installation in terms of its check in/check out activity in the SCCS. You can only view the history of the installation file (.WSI or .
Using Source Control Comparing the Current Installation to the Latest in Source Control " Not available in the Visual Studio integrated editor. You can only use this feature if you’ve added the current installation to your source code control system (SCCS). You can perform a table-by-table, row-by-row comparison of the database tables that make up an installation file (.MSI or .WSI). The current installation file is compared to the latest installation file that is checked into your SCCS. 1.
About Path Variables About Path Variables Note (Visual Studio integrated editor only.) This feature is independent of Visual Studio .NET’s Configuration Manager feature, which lets you store source files in Release and Debug directories. When you add a file to an installation, its source path is stored. During compile, the source path information is used to find the file and compile it into the .MSI or .EXE. The Path Variables page lets you define variables to replace commonly-used source paths.
About Path Variables Turning substitution off does not remove the path variable from paths for files added previously; it only affects paths for files added subsequently. Creating a User-Defined Path Variable You can create a user-defined path variable that is set to a directory on your system. For information on using variables for source paths, see About Path Variables on page 322. 1. 2. Select Installation Expert > Path Variables page.
About Path Variables Creating a Path Variable Based on a Registry Value You can create a path variable that is set to a registry value. For information on using variables for source paths, see About Path Variables on page 322. When a registry path value is displayed on the Path Variables page, a double slash precedes the value name. This is normal. (You might have to scroll to the right to see this value in the Defined Value column.) 1. Select Installation Expert > Path Variables page. 2.
Changing Source Paths in an Installation Changing Source Paths in an Installation Note (Visual Studio integrated editor only.) This feature is independent of Visual Studio .NET’s Configuration Manager feature, which lets you store source files in Release and Debug directories. As you work on an installation, paths to files listed on the Files or Web Files page can become invalid if you: ! Move files that are part of the installation to a new directory on your computer or network.
Changing Source Paths in an Installation The Convert Source Paths dialog appears with a list of all the directories that are referenced in the installation. 2. Select a directory from the list. To change multiple directories, select a high-level directory so that you can change all of its subdirectories. 3. Click Change Selected Path. The Change Selected Path dialog appears. 4. Complete the dialog: • Change to Specify the new pathname.
Changing Source Paths in an Installation Note Paths to files that are not on the same drive as the installation file are not changed, because they cannot be written as relative paths. Predefined paths, such as [ProgramFiles], cannot be changed to relative paths. 3. To convert all directories you add to the installation later to relative paths, select Relative Paths from Path Type. 4. Click OK.
Changing Source Paths in an Installation To create a property to hold the source directory value: 1. Select Setup Editor > Product tab and click the Properties icon in the left pane. 2. In the right pane, select New > Property from the right-click menu. The Property Details dialog appears. 3. Complete the dialog and click OK: • Name Enter a new property name. • Value Enter the directory path that currently contains the source files.
Chapter 15 Merge Modules and Transforms You can apply merge modules and transforms to installations you create in Wise for Windows Installer. Both change the installation in some way. Merge modules are databases that contain separate, self-contained software installations. You use them to insert shared Windows Installer components and setup logic into an installation during compile. Transforms are applied at runtime only, to customize the installation for a particular group of end users.
About Merge Modules About Merge Modules A merge module is a special kind of Windows Installer database that contains the components needed to install a discrete software bundle. A merge module cannot be installed alone, but must be merged into a standard Windows Installer installation during compile of the installation. Typically, a merge module or a collection of merge modules related by dependencies installs a software product or portion of a product at runtime.
About Merge Modules Creating a Merge Module Within a Solution on page 336 Creating a Merge Module From Existing Components on page 337 Creating a Configurable Merge Module on page 338 About the Merge Modules Page on page 344 Editing Merge Module Details on page 346 Available Tabs and Pages in Merge Modules When you work in a merge module, you have access to a limited set of pages in Installation Expert. Some of these pages are unique to merge modules.
About Merge Modules • Module Type Select the module type. This defaults to the Default Application Type that is specified in Wise Options. See Setting .NET Assembly Options on page 45. Note The ability to create .NET installations is supported only by Windows Installer 2.0 or later. # Win 32 (non .NET) A standard Win32 merge module without .NET assemblies. # .NET Application A .NET merge module with only .NET elements. # Mixed (.NET and Win32) A merge module that contains both Win32 and .NET elements.
About Merge Modules 2. Click Add at the right of the Dependencies page and specify one or more merge modules. If you select one merge module, the Dependency Module Details dialog appears. If you select multiple merge modules, they’re listed on the Dependencies page. Double-click a module name to open the Dependency Module Details dialog for a specific merge module. Fields are populated with information extracted from the merge module. 3.
About Merge Modules If you select multiple merge modules, they’re listed on the Exclusions page. Doubleclick a module name to open the Exclusion Module Details dialog for a specific merge module. Fields are filled in with information extracted from the merge module. 3. Complete the dialog: • Module ID To specify a different merge module, click Browse. • Language ID To specify a different language for the merge module to be excluded, change the number in Language ID.
About Merge Modules Starting a new merge module in the Visual Studio integrated editor: 1. Start Visual Studio .NET. If a solution is open, close it. 2. Select File menu > New > File. The New File dialog appears. 3. In the Categories list, select Wise Files. 4. In the Templates list, click one of the following icons: • Merge Module File Create an .MSM (Windows Installer merge module). Because the .MSM typically encapsulates all the files of the merge module, it is larger and takes longer to save.
About Merge Modules Creating a Merge Module Within a Solution " Visual Studio integrated editor only. When you work in the Visual Studio integrated editor, you typically create a merge module as a project within a Visual Studio .NET solution. Because the merge module is synchronized with the other projects in the solution, it is rebuilt every time the solution is rebuilt. Use this method if the content of the merge module is frequently changing.
About Merge Modules 11. If you’re creating a configurable merge module, specify which items can be modified when the module is merged into an installation. See Creating a Configurable Merge Module on page 338. 12. Select the dependencies and exclusions for this merge module. Dependencies are other merge modules that must be included with this merge module, and exclusions are other merge modules that cannot be included with this merge module.
About Merge Modules • Language Enter the language code for the merge module. English is 1033. Language neutral (meaning the merge module works with all languages) is 0. See Language IDs on page 277. 4. Click Next. The Merge Module Components dialog appears. 5. From Export from Feature, select the feature that contains the components to move. If you are moving components from a merge module, there are no features. 6. Mark the checkboxes of the components to move into the new merge module. 7.
About Merge Modules • Constant Select to add a constant value in combination with configurable items. Example: After adding a configuration item, select this option to add a pipe character (|) before adding another configuration item. 6. Click OK. The value you defined for the configurable item appears in the Value field, and the item appears in the Configuration Items list box. 7. To add more values for the item, repeat the preceding 2 steps.
About Merge Modules # Text Drop-down List The installation author can select from a drop-down list to replace the default value. This list displays only the name you gave the value, not the actual value. This is useful when the values are not self-explanatory. (Example: Use this option to make a property configurable. Possible choices for the installation author could be to let all end users or only selected end users install this particular file.
About Merge Modules Specifying Drop-Down List Values for Substitution " Professional and Enterprise Editions only. When you add a configuration item to a configurable merge module as a text drop-down list, you must specify values and the text that describes them. When adding the merge module to an installation, the installation author selects from a list that displays the descriptive text. See Text Format Types in the Windows Installer SDK Help. 1.
About Merge Modules value of the vital attribute is 512. You would add these values and enter a bitmask of 516. 5. Click Add. The Drop-down List Value dialog appears. 6. Complete the dialog: • Name Enter text to describe the substitution value. The installation author sees this value in the Value drop-down list on the Merge Module Configuration dialog. • Value Enter the value to be substituted for the current value of the configuration item. 7. Click OK.
About Merge Modules 7. Click OK. Example: Configuring an Item for a Merge Module " Professional and Enterprise Editions only. Suppose your merge module includes a file named ReleaseNotes. Here is how you can let installation authors select a long or a short file name when they merge the module into an installation. 1. Select Installation Expert > Substitutions page. 2. Click Add at the right of the page. The Module Substitution dialog appears. 3. From Table, select File. 4.
About Merge Modules • Type Select Arbitrary Text. • Default Value Enter “ReleaseNotes.txt.” 12. Click OK. On the Module Substitution dialog, long_name appears in the Configuration Items list box, below the pipe character. Value shows the substitution options for the file name: [=short_name]|[=long_name]. 13. When you add this merge module to an installation, the configuration items will appear in the order they are listed here. To rearrange the items click move up and move down.
About Merge Modules Items you add to a feature are only installed on the destination computer if the feature is installed. Items you add to a condition are only installed if the feature is installed and the condition is true. 3. Click Add at the right of the Merge Modules page. The Select Merge Module dialog appears and lists available merge modules in the directories specified in Wise Options. See Setting Merge Module Directories on page 52.
About Merge Modules 13. If any of the merge modules you’re adding is configurable, the Merge Module Features dialog contains a Next button. Click Next to continue. The Merge Module Configuration dialog appears. 14. In the list box, select the name of the item to configure. If the Value drop-down list appears, select a value. If a text field appears, its label indicates the type of data you can enter. For a description of possible values, see Editing Merge Module Details on page 346. 15.
About Merge Modules • In the list box, select the name of the item to configure. • If the Value drop-down list appears, select a value. It will be either a bitfield value, a table, or text. If a text field appears its label indicates the type of data you can enter: # Text Value Enter any text. # Formatted Text Value Enter any text in Windows Installer formatted text format. # RTF Value Enter any text in rich text format.
About Transforms About Transforms A transform is a special kind of Windows Installer file (.MST) that customizes a Windows Installer installation. You use it to change the installation in some way for a specific group of end users. When you create a new transform, you must specify a standard installation database (.MSI) on which to base the transform. Unlike merge modules, which you can add to multiple installations, you create a transform to work only with a specific installation.
About Transforms • In the Templates/Tools list, select the Transform icon, then click OK. (In Visual Studio: in the Templates list, select Transform File, then click Open.) The Open File dialog appears. 3. Specify the .MSI on which this transform should be based. The transform opens with the exact settings of the installation on which it is based. 4. Make changes to the installation, such as turning features on or off, or changing any other settings. Note If you add files when editing a transform, a .
About Transforms • Add existing table Suppress errors from occurring if the transform attempts to add a table that already exists in the base .MSI. This is marked by default when you create a transform. • Delete missing table Suppress errors from occurring if the transform attempts to delete a table that doesn’t exist in the base .MSI. This is marked by default when you create a transform.
About Transforms ! Output the installation as an .EXE that launches an .MSI, which lets you send command line options to the .MSI. Do this on the Build Options page. See the example below. Example: Applying a Transform with an .EXE In this example, you output the installation as an .EXE that launches an .MSI and applies the transform. 1. Select Installation Expert > Releases page. 2. Create a new release. See Creating a New Release on page 180. 3.
About Transforms ! To isolate resources for each instance, install them into a location that depends on the instance identifier. For additional guidelines, search for “Authoring Multiple Instances with Instance Transforms” in the MSDN Library (msdn.microsoft.com/library/). Creating an instance transform: 1. Open the base installation or patch for which you are creating an instance transform. 2. Select Installation Expert > Instance Transforms page. 3.
About Transforms would be installed on top of each other in the same directory as for the base installation. 7. Click OK. The instance transform is added to the list on the Instance Transforms page. To edit an instance transform, double-click its name. The actual transform files (.MST) are created during compile. Installing Multiple Instances " Professional and Enterprise Editions only.
Chapter 16 Tools Wise for Windows Installer contains powerful tools that perform specialized functions. You can start a tool by selecting its name from the Tools menu. (In Visual Studio: Project menu.) Some tools are also available on the Tools toolbar. To display the Tools toolbar, select View menu > Tools. (In Visual Studio: View menu > Toolbars > Wise Wizards.) You also can start some tools from the New Installation File dialog, which puts the results from the tool into a new installation file.
ApplicationWatch ApplicationWatch ApplicationWatch monitors your system as you execute an application or run an installation and helps you determine which .DLL, .OCX, and .EXE files were accessed. It adds these files to the current Windows Installer installation. You can use this tool for informational purposes or to facilitate the creation of a new installation. Note Application Watch cannot monitor 16-bit applications. 1.
Convert InstallShield Professional Convert InstallShield Professional You can use the Convert InstallShield® Professional tool to convert an installation script project (.IPR) that was created in version 5.5 or later of InstallShield Professional to a Windows Installer package.
Convert InstallShield Professional More errors might appear at this point, which have to do with saving in Windows Installer format. The installation that was created from the .IPR file opens. Pages in Installation Expert, such as the Files page, are populated based on the contents of the source installation. If a file that is part of a merge module is added, the Files in Merge Modules dialog appears. It prompts you to add the merge module and, if necessary, download it.
Convert SMS Installer or WiseScript Installation Convert SMS Installer or WiseScript Installation With this tool, you can convert the following types of installation scripts: ! An .IPF file created in Microsoft’s System Management Server (SMS). ! A .WSE file created in version 5.0 and later of Wise Installation System. ! A .WSE file created in WiseScript Editor. ! An .EXE file created by one of the applications above. Do this when you do not have the original installation file. The compiled .
Convert SMS Installer or WiseScript Installation When the conversion is finished, the Conversion Complete dialog appears. It shows the results of the conversion and lists any errors or problems that might have occurred. (Example: If files referenced by the original script could not be found, an error is displayed.) You can fix these problems in Wise for Windows Installer. 5. 6. To obtain a record of the conversion errors, click Save Errors or Print Errors. Click Finish.
Import Visual Studio Projects Import Visual Studio Projects Visual Studio Projects in the Wise Editor The Import Visual Basic, Visual C#, or Visual J# tools let you import a Visual Basic, C#, or J# project file into an installation file. You specify information about the project, and the tool extracts information, such as source file paths, and integrates it into a new or existing installation. For instructions on running these tools, see Importing an Installation From a Visual Studio Project on page 361.
Import Visual Studio Projects Importing an Installation From a Visual Studio Project " Not available in the Visual Studio integrated editor. Use the following procedure to create a Windows Installer package from a Visual Basic, Visual C#, or Visual J# project. For general information on these tools, see Import Visual Studio Projects on page 360. 1. Do one of the following: • Select File menu > New.
Import Visual Studio Projects The Files Not Found dialog appears if necessary, which lists the target files that were not found during the scan. 8. 9. If necessary, select a file and click Browse to locate missing files. Files might be missing if the configuration of the solution that you selected has not been built. Missing files will cause compile errors in the installation that results from this import process. Click Next.
Import Visual Studio Projects • Select File menu > New > File and double-click Import Visual Basic. Use this method to create an installation that contains only the information from the converted installation. • Select Project menu > Import Visual Basic. This is available only if you have opened a file and not a project. Use this method to add the imported installation’s information to the current installation file. The Project File dialog appears. 2.
Import Visual Studio Projects • Installation Directory Enter the default installation directory where files from this import should be placed. This determines the folder on the Files page of Installation Expert in which all added files are placed. 11. Click Finish to complete the import. If a file that is part of a merge module is added, the Files in Merge Modules dialog appears. It prompts you to add the merge module and, if necessary, download it. See Adding Merge Modules Instead of Files on page 126.
MSI to WSI Conversion MSI to WSI Conversion Use MSI to WSI Conversion to convert existing .MSI files to Windows Installer project files (.WSI). An .MSI is a distributable installation. Because an .MSI typically encapsulates all the files in the installation, it is larger and takes longer to save. A project file (.WSI) compiles to an .MSI. Instead of compressed files, a .WSI contains paths to source files. A .WSI file is smaller and you can set multiple options for the output of the .MSI.
MSI to WSI Conversion 4. On the Merge Module Sources dialog, you can change the default for extracting merge modules, which is to extract them from the .MSI into the default source directory you specified on the Welcome dialog. To accept the default, click Next. To change the default, see Specifying Merge Module Source Directories on page 366. 5. On the File Sources dialog, you can change the default for extracting files, which is to extract them from the .
MSI to WSI Conversion 4. Complete the .MSI to .WSI conversion wizard. To replace merge modules with merge modules on your computer by specifying the merge module location: 1. 2. On the Merge Module Sources dialog, select one or more merge modules to replace. Click Change Path and select Replace With Local File. If multiple merge modules are selected, the Select Directory dialog appears. If one merge module is selected, the Choose Replacement Merge Module dialog appears. 3.
MSI to WSI Conversion ! Reset to Default After changing the source path through any of the above methods, you can reset a file to its default, which is to extract to the default source directory. To change the directory to which files will be extracted: 1. 2. On the File Sources dialog, select one or more files. Click Change Path and select Change Source Directory. The Select Directory dialog appears. 3. Select a directory and click OK.
MSI to WSI Conversion install to the same directory. Example: Suppose the installation Application.msi contains both a Windows NT version and a Windows 98 version of the file pshop.dll. Only one file gets installed, depending on the operating system the installation runs on. In an installation with duplicate files, MSI to WSI Conversion cannot change the paths to point to your local computer, because your local computer only contains one copy of the file.
Package Validation Package Validation Package Validation checks a Windows Installer package for errors based on rules in one or more validation modules. It validates package files (.MSI and .WSI), merge modules (.MSI and .WSM), and transforms (.MST). For details, see Validating a Package. ! If you correct validation errors in a .WSI or .WSM, it is recompiled to an .MSI or .MSM at the end of validation. ! If you correct validation errors in an .MSI or .MSM, errors are not corrected in any corresponding .
Package Validation 5. If this installation contains multiple releases, the Release drop-down list appears below the list of validation modules. Select the release to test. 6. (Professional and Enterprise Editions only.) To customize or create validation modules, click Customize and see Customizing Validation Modules on page 372. 7. Click Next to start testing. The Performing Validation dialog appears. When the validation is complete, the View / Correct dialog appears.
Package Validation 13. Click Finish. Also see Package Validation Customizing Validation Modules " Professional and Enterprise Editions only. A validation module is a .CUB file that contains one or more validation rules. A validation rule can be a custom action that calls a .DLL, .EXE. or VBScript (.VBS), or a rule set that consists of a series of conditions and actions.
Package Validation 7. To add a rule to the validation module, click Add to the right of the Validation Rules list. To add a rule that: • Calls a custom action, see Adding a Rule That Calls a Custom Action on page 374. • Consists of a series of conditions and actions, see Adding a Validation Rule Set on page 376. 8. To enable or disable the rules to use during validation, see Selecting Validation Rules to Use on page 373. 9.
Package Validation • 5. Consists of a series of conditions and actions, see Adding a Validation Rule Set on page 376. When you finish, click OK. The customizations remain in effect until you change them. Also see: Customizing Validation Modules Predefined Validation Modules About Rules That Call a Custom Action " Enterprise Edition only. You can add rules that call a custom action to a new or existing validation module (.CUB). The custom action, which must be in the form of a .DLL, .
Package Validation 2. Start Package Validation as described in Validating a Package on page 370 and click Customize on the Welcome dialog. The Customized Validation Rules dialog appears. Validation Files lists the predefined validation modules and any validation modules you’ve added. When you select a validation module, its rules appear in Validation Rules. 3. In Validation Files, select a validation module to customize. Note: You cannot add rules to predefined validation modules.
Package Validation Note: You cannot add rules to predefined validation modules. Example: Suppose you want to determine if your packages contain any version of report.dll earlier than 2.0.0 and if so, replace it with version 2.0.0 of report.dll. The rule set you create for this check would contain the following conditions and actions: Select file with name report.dll and where version is less than 2.0.0 Display text report.dll version less than 2.0.
Package Validation • Rule name Enter a unique name for this rule. • Type Select whether an issue that breaks this rule will be displayed as an error or warning on the View / Correct dialog. The Conditions dialog appears. 7. In Which condition(s) do you want to check, mark conditions in the order they should be checked. The conditions you mark appear in the Rule description list. 8. If a condition contains underlined text, click the underlined text to open the Rule Details dialog and specify its value.
Package Validation The Customized Validation Rules dialog reappears, and the new rule set is displayed at the end of the Validation Rules list with its checkbox marked. 16. To add more rules to this validation module, either repeat this procedure or see Adding a Rule That Calls a Custom Action on page 374.
Package Validation ! Components shared with non-Windows installer applications Checks that no components of the package are shared with other applications that do not use Windows Installer. ! Files installed to Program Files by default Checks that all application files are installed to a subdirectory of Program Files. ! Terminal Server Compatibility (Enterprise edition only.
Chapter 17 Setup Editor Setup Editor is a powerful view of the installation, and using its advanced features requires proficiency in the Windows Installer development environment or in software development in general. While Installation Expert lets you create basic Windows Installer installations and provides an easy-to-use, task-oriented user interface to set the most common installation tasks, Setup Editor lets you create fully customized, interactive installations.
About Setup Editor About Setup Editor Setup Editor provides an in-depth view of all changes you make to an installation. You can make those changes in Setup Editor or Installation Expert. However, there are certain advanced tasks you can perform in Setup Editor only: ! Edit the text on installation dialogs. ! Create components and assign them to features. ! Build complex conditions that must be met for installation to occur. ! Select dialogs to appear during maintenance installations (uninstalls).
About Setup Editor ! Features Add, edit, and delete features. Assign components to features; add and remove components to and from features; and arrange the features of the installation. See Features Tab on page 385. ! Dialogs Select and customize dialogs the installation uses. See About the Dialogs Tab on page 431. ! Tables Edit tables in the .MSI database. You can access most of the data in these tables through Installation Expert pages or other tabs of Setup Editor.
Product Tab Product Tab On the Product tab in Setup Editor, you set and edit the following information for an installation: Summary Use the Summary icon to set the value of a summary item. End users can see the summary information by right-clicking the compiled .MSI or .EXE in Windows Explorer and selecting Properties. See Specifying Summary Information on page 383. Properties Use the Properties icon to add, edit, and delete properties in an installation.
Product Tab To set the value of a summary item: 1. In Setup Editor > Product tab, click the Summary icon. 2. In the upper right pane, double-click a summary item. The Summary Details dialog appears. 3. In Value, enter a new value. 4. Click OK. You also can edit several of the summary items in Installation Expert > General Information page. See General Information Page on page 105.
Features Tab Features Tab The Features tab lets you manipulate an installation’s features and all corresponding items. It displays a tree structure that lists all components, merge modules, files, registry entries, and other installation items associated with each feature. For information on what features are and how they are used, see Working With Components and Features on page 540. Features you add in Installation Expert are displayed on this tab.
Features Tab ! File association. See Advertising Icon on page 387 and Adding File Associations on page 158. ! File. See Adding Files to an Installation on page 123. ! INI file. See Creating and Editing .INI Files on page 152. ! ODBC source, driver, or translator. See Adding an ODBC Item on page 164. ! Registry key. See Adding Registry Keys on page 145. ! Service control. See Controlling Services on the Destination Computer on page 162. ! Service.
Features Tab To unassign a component: 1. In Setup Editor > Features tab, expand the folder for the feature that contains the component to unassign. 2. Click the Components icon. All components for the feature appear in the upper right pane. 3. In the upper right pane, right-click a component and select Unassign. Components that are not assigned to any feature are not installed on the destination computer. To move a component to a different feature: 1.
Features Tab Advertisement, which is a way to deploy applications in large organizations, is available with Windows Installer, but only for supported platforms. See Advertisement and Platform Support of Advertising in the Windows Installer SDK Help. To view or edit AppID or ProgID information: 1. In Setup Editor, on the Components or Features tab, expand the Advertising icon under a feature or component and select the AppID or ProgID folder.
Features Tab ! Place a file in the same directory with a different name. See DuplicateFile Table in the Windows Installer SDK Help. You can create a duplicate file entry only for files that are already in the installation. Note Duplicate files are not created for .NET assemblies added to both the application directory and the Global Assembly Cache. Instead, they are treated as separate components. To add a duplicate file entry: 1.
Components Tab Components Tab The Components tab lets you manipulate an installation’s components. It displays a tree structure that lists all files, registry entries, and other installation items contained in each component. It also indicates any component errors. Installation Expert automatically creates the appropriate components for each item you add and organizes them according to a component rule set you select.
Components Tab ! INI file. See Creating and Editing .INI Files on page 152. ! Isolated component. See Isolating a .DLL With an .EXE on page 395. ! ODBC source, driver, or translator. See Adding an ODBC Item on page 164. ! Published component. See Adding Published Components on page 395. ! Registry key. See Adding Registry Keys on page 145. ! Service control. See Controlling Services on the Destination Computer on page 162. ! Service.
Components Tab ! To edit a component, double-click its name. ! To edit multiple components, first select the Components icon in the upper left pane. In the upper-right pane, select components, right-click, and select Details. On the Multi-Component Details dialog, you can edit a subset of the fields found in the Component Details dialog. ! To delete or rename a component, use the right-click menu. To add a new component: 1. In Setup Editor > Components tab, right-click and select New > Component.
Components Tab • Key Path Select the item Windows Installer should use as a key path. The drop-down list shows files, registry entries, or ODBC data sources that are included in the component, depending on your selection in the Key Path Type field. See About the Key Path on page 394. • Always increment shared .DLL count Mark this to increment the count of applications using .DLLs in this component when installing it, even if the component is already installed.
Components Tab • Extract advertising information from registry file Mark this to take information from the .REG file and places it into the advertising tables instead of the registry tables if possible. 3. Click OK on the Component Details dialog. If the installation has only one feature, the component is added to that feature. If the installation has more than one feature, the Select Feature(s) to Assign Component to dialog appears. 4.
Components Tab To set an item as key path: ! In Setup Editor > Components tab, right-click the item and select Set as Key. OR ! Select the item as key path on the Component Details dialog. See Adding and Editing a Component on page 391. Isolating a .DLL With an .EXE To prevent .DLL conflicts, you can associate a .DLL file in the installation with a specific .EXE file in the installation. Then Windows Installer automatically associates the .DLL with the .
Components Tab • Publish GUID (Optional.) To replace the automatically-generated GUID (globally unique identifier) for this component with a new one, click Generate. • Feature Select the feature to have published. • Component Select the component to have published. • Qualifier Enter a text string to distinguish multiple forms of the same component. • Application Data Enter a text string that describes the qualified component, that is, the combination of component and qualifier.
Tables Tab Tables Tab The Tables tab lists every table in the Windows Installer database. Most of this data is accessible in Installation Expert or in the other tabs of Setup Editor. The Tables tab lets you edit existing table data, add new data, add new tables, and delete tables. In addition to standard Windows Installer tables, the Tables tab also lists Wise tables, which are described in About Wise Tables on page 402.
Tables Tab ! To display a table’s contents, click its name in the left pane. The table’s contents appear in the upper right pane, arranged in columns by field. The column width and sort order are retained when you leave the Tables tab. The top heading row of the table displays field names. Key fields are indicated by a key symbol. By convention, database columns that are external keys take the name of the primary key column with an added underscore character.
Tables Tab • Value Range Min/Value Range Max Enter minimum and maximum allowed values for an integer field. These fields are available only when the data type is a long or short integer. • Value Set Enter a list of acceptable values for this field, separated by semicolons. • Key Table Select the table to which this column is linked. Example: The SelfReg table has a column File_ that is linked to the File table. • Key Column Select the column in the linked table.
Tables Tab 2. 3. In the upper right pane, do one of the following: • Click the field to change and press Enter or F2. • If a field is already active, press Tab to move from left to right or Shift+Tab to move from right to left within the table. Type new data or change the existing data. Some table columns have drop-down lists that you can use for editing. Example: The drop-down list for the Feature_Parent column in the Features table lets you select a new parent for the current feature.
Tables Tab You can use the Task List to review the errors (see Using the Task List on page 29) or you can click a red table name and use the Find Error menu item to find the row that contains the error. See the following procedure. To find individual validation errors in a database: 1. In Setup Editor > Tables tab, right-click and select Find Error. The Find dialog appears. 2. In the Direction section, mark either Up or Down to specify the search direction. 3. Click Find Next.
Tables Tab 5. Click OK. About Wise Tables Wise tables contain information related to items you’ve added in Wise for Windows Installer. These tables are included in a .WSI file only, unless you use an .MSI file as the project file. When you compile, these tables are not included in the resulting .MSI. Caution Deleting, adding, or editing table data directly is not recommended unless you are an experienced Windows Installer developer with a clear understanding of Windows Installer database technology.
Tables Tab ! WisePathReplacement. This table, in combination with Wise custom actions, enables conversion of registry path values that contain long file names or trailing backslashes. ! WisePathVariable. Contains paths defined on the Path Variables page. ! WisePocketPCFile. Contains information about each file for a Pocket PC application. ! WisePocketPCPlatform. Contains information about each platform that the user selects on the Support Platform dialog for a Pocket PC application.
Tables Tab ! WiseWebSites. Stores the settings you chose for Web sites you created on the Web Files page. ! WiseWildcard. Contains an entry for each time you add a wildcard on the Installation Expert’s Files page and mark the Update installation as files are added or removed from source directory checkbox. ! WiseWildcardFile. Contains a list of files that were originally added via a wildcard, and were later deleted because they no longer exist.
Chapter 18 Using Conditions and Properties Conditions and properties are integral parts of any complex installation. To do advanced customization of an installation, you’ll probably need to use conditions and properties. Topics include: ! Conditions. ! Where Can You Use Conditions? ! Condition Guidelines and Examples of Conditions. ! Creating Conditions With Condition Builder. ! Properties. ! How Do You Use Properties? ! Creating a New Property.
Conditions Conditions Conditions are like expressions: they evaluate to a true or false value. You associate conditions with different elements of an installation such as features, components, actions, dialogs, and dialog controls to determine whether something happens or not. Based on whether the condition is true or not, you can determine whether to: ! Allow the installation to continue. ! Install certain features and components. ! Display certain dialogs or dialog controls.
Conditions Conditions for Controls on Dialogs In Setup Editor > Dialogs tab, you can use conditions with dialog controls. Controls are the items that appear on dialogs, such as text boxes, radio buttons and checkboxes. Because many conditions are already set on the default installation dialogs, you can use those for examples of how you might use conditions in dialogs. View them in Setup Editor > Dialogs tab.
Conditions ! • The name of the property. This is case-sensitive. You do not need to enclose the property name in square brackets. See Using Properties in Conditional Statements in the Windows Installer SDK Help. • Any integer between -32,767 and 32,767. You cannot use floating point values. • String literal. Enclose text in quotation marks. Example: “Windows NT 4.0”. Properties that have not been set evaluate to an empty string “” (null). • Environment variable.
Conditions Condition The Condition Is True If CHECKBOX_IS_MARKED You make a checkbox and associate the property CHECKBOX_IS_MARKED with it, and during installation, the end user marks the checkbox. VersionNT The installation is running on Windows NT 4, 2000, or XP. Version9X AND NOT Installed The installation is running on Windows 95, 98, or Me, and the application is not yet installed. WiseFixConditions Wise Solutions has created a special merge module, WiseFixConditions (CondFix.
Conditions Scrolling text box. Enter or build conditions here. Click to check the syntax of conditional statements. Operator buttons Mark Ignore Case to make conditions case-insensitive. This inserts a ~ when you click a comparative operator button. Lists Operator Buttons Most of the operator buttons in the middle of the dialog, starting with the = button, are described in Conditional Statement Syntax in the Windows Installer SDK Help. They include logical, comparative, string, and bitwise operators.
Conditions ! Install/Action state Use this list only to check the installed state of a component or feature. Absent means the feature or component is not installed, Advertised means it is advertised, Local means it is installed on the local hard drive, and Source means it is installed to run from the installation source.
Conditions 2. In the Fields list, click the Environment Variable folder. The Values list displays the environment variables that currently exist on your computer. If the environment variable you want is not in the list, enter its name in the condition list box at the top of the Condition Builder dialog. For information on available environment variables, consult Microsoft Windows developer documentation. 3. In the Values list, double-click the name of the environment variable. 4. Click the = button.
Conditions Note You cannot add this type of condition to the Launch Conditions icon in Setup Editor > Product tab. Also, when you add this type of condition, add the merge module CondFix.msm to the installation. This merge module fixes a Windows Installer limitation. For details, see WiseFixConditions on page 409. 1. Access the Condition Builder dialog. See Creating Conditions With Condition Builder on page 409. 2. In the Fields list, click the Feature or Component folder. 3.
Properties Properties Properties are variables used by Windows Installer during installation. You often use properties inside conditions. You can hard-code the value of a property, but you can also make properties more flexible by manipulating them during runtime based on user input, system configuration, or other situations.
Properties Example: In Setup Editor > Dialogs tab, the Installation Type Dialog has a set of radio buttons. The radio buttons are associated with a property named InstallMode, and based on the value of InstallMode, the Next button displays a different dialog. Double-click the radio buttons and the Next button, to view their Properties dialogs. See About Dialog Controls on page 435. In conditions You can use properties inside conditions. You do not need to enclose the property name in brackets.
Properties Note You cannot enter other properties to set the value of a new property because text you enter is interpreted literally. This is not true for some specific Windows Installer properties, such as DiskPrompt and PrimaryFolder. To set a property to the value or values of other properties, use the Set Property custom action. See Set Property on page 530. • Hidden property Mark this to designate this property as hidden. This Windows Installer 2.
Properties Property Name Description _WiseDebugMode By default, debug mode is off. Set this property to 1 to debug .DLLs that you added to an installation using a custom action. For this feature to work, the Custom Action Type for the action must be Call DLL with Variable Parameter List and you must have the Microsoft Visual C++ development environment installed. The debugger opens at a breakpoint just before your .DLL code begins, so at first you might see assembly code.
Properties Property Name Description INSTALLDIR This is the main installation directory for the application. By default, INSTALLDIR is set to the first directory you create under the Program Files folder on the Files or Web Files page. On the Destination Folder dialog during installation, the end user can change this directory. The Windows Installer property PRIMARYFOLDER is set to the value of INSTALLDIR before installation of files begins.
Properties Property Name Description ReinstallFileVersion Indicates the action to take when the same version of a file being installed already exists. The default value of “o” means overwrite. This sets an option on the ReinstallMode dialog. ReinstallRepair Indicates the action to take when reinstalling or repairing a file. The default value of “r” means repair. This sets an option on the ReinstallMode dialog.
Properties Property Name Description WiseInitProductName Contains the text displayed in the title bar of the installation’s initialization window. The initialization window is the small window that appears before the installation wizard dialogs appear. This value overrides the value stored in the ProductName property for the initialization window, to provide a shorter name that fits in the window. This property is absent unless you create it. If an installation creates an .EXE that launches an .
Properties Property Name Description CharSet Contains the character set that is used in the installation’s initialization window. Different languages have different character sets. The initialization window is the small window that appears before the installation wizard dialogs appear. This also affects any other initial dialogs that appear, such as the language selection and password dialogs. CharSize Contains the font size that is used in the installation’s initialization window.
Properties Property Name Description Remove Previous If this is set to 1, the end user is prompted to remove any previously installed versions of the same application. It is set to 1 if you mark the Prompt to remove previous version before installing checkbox on the Build Options page. The message stored in the WiseInitExistError property displays. Runtime9x Contains the relative pathname of the file that installs Windows Installer for Windows 95/98.
Properties Property Name Description ASPNET_USER When the .NET Framework is installed, it creates a user account with limited privileges to run ASP .NET applications. This property is populated with the ASP account of either the latest version of .NET, or the version of .NET checked for on the System Requirements page. ASPNET1.0_USER This property is populated with the ASP account that was created by the 1.0 version of .NET. ASPNET1.
Chapter 19 Working With Dialogs You can select, edit, and rearrange dialogs that appear to the end user during installation. This lets you determine the level of control the end user has over the installation. You also can select the theme that controls the overall look of the installation dialogs. For most installations, the Dialogs page provides all the options that are needed for selecting and editing dialogs.
About Dialogs About Dialogs You can access dialogs from: ! Dialogs page (in Installation Expert) The dialogs on the Dialogs page are those in the Welcome Dialog Wizard, which appear to the end user during a normal installation. Turn the dialogs on or off, rearrange them, view conditions, and select the dialog theme. Click the Dialog Editor button to display a dialog on the Dialogs tab. ! Dialogs tab (in Setup Editor) Edit any dialogs in the installation and create new dialogs.
About Dialogs ! If you create an installation based on a certain template in the New Installation File dialog. Example: The Server Application template contains the SQL Connection Dialog. Dialogs That Can Appear in Installations ! Welcome Dialog ! License Dialog See Importing Text into License and Readme Dialogs on page 430. ! Readme Dialog See Importing Text into License and Readme Dialogs on page 430.
About Dialogs Also see: Using the Dialogs Page on page 428 About the Dialogs Tab on page 431 About Dialogs on page 425 427
Using the Dialogs Page Using the Dialogs Page Use the Dialogs page in Installation Expert to view, activate, and rearrange installation dialogs that are part of the Welcome Dialog Wizard. The dialogs you activate determine the level of control the end user has over the installation. Using the Convert Button: The Dialogs page looks different based on the version of Wise for Windows Installer that the current installation was created in. If the current installation was created in 6.
Using the Dialogs Page About changing conditions On the Dialogs page, you see the conditions attached to each dialog. You can change these conditions by double-clicking the dialog name and editing the Conditions field, but this is not recommended. Most of the Windows Installer properties referenced in conditions are documented in the Windows Installer SDK Help.
Using the Dialogs Page • 4. To create a new theme based on an existing theme, click a theme in the list, click Copy, and enter the new theme’s name in Name. To add images to a new theme or to change an existing theme’s images, click Browse to the right of Top Image Preview or Side Image Preview and select a new image file. The image you select appears in the preview pane. When you create a new theme, the images you specify are copied to a new subdirectory in the Themes directory.
About the Dialogs Tab About the Dialogs Tab Use Setup Editor > Dialogs tab to select, edit, and create the dialogs that will appear in an installation. It shows the complete list of dialogs and provides more options for working with dialogs than are available in Installation Expert > Dialogs page. The Dialogs tab contains a Layout menu, a right-click menu, and a toolbar that let you add new controls to dialogs, edit existing controls, and organize dialog content.
About the Dialogs Tab When you finish adding and configuring controls, use other commands on the Layout menu to help organize and arrange them. (In Visual Studio: use commands on the Format menu.) When you perform an operation on multiple controls at once (example: aligning controls), the last control you select is the master control, which the other selected controls will conform to. The master control is surrounded with solid handles instead of hollow handles.
Editing Dialog Details Editing Dialog Details You can edit the general details of any installation dialog from either two places: ! The Dialogs tab in Setup Editor: Right-click the name of a dialog in the left pane, and select Details. ! The Dialogs page in Installation Expert: Select the dialog and click the Details button. Caution If you are using the Installation Types page to manage the Installation Types dialog, do not change any details on the Installation Type dialog.
Creating a New Dialog Creating a New Dialog The New Dialog Wizard guides you through the process of adding a new dialog to an installation. 1. Start the New Dialog Wizard: • Select Setup Editor > Dialogs tab. In the left pane, right-click where the new dialog should appear, and select New > Dialog. • Select Installation Expert > Dialogs page > Add button. OR The Select Dialog Type dialog appears. Note The dialog templates that appear are in Wise Standard.msi, which is stored in \Templates\Dialogs.
About Dialog Controls About Dialog Controls Installation dialogs contain standard controls, which you can add and edit. Most controls are configured by completing their Properties dialog. See Editing Dialog Controls on page 436. Dialog controls often have an associated property. The result from the dialog control is put into the property. To have a dialog control be deselected by default, associate the control with a property whose value is not defined (null).
About Dialog Controls ! Path Edit. A single line input field that accepts only a valid pathname. This is intended to be used in conjunction with the directory list box or directory combobox controls. ! Progress Bar. A control that displays the progress of an installation or other operation. ! Radio Button. A group of mutually exclusive options with a separate radio button for each option. ! Scrollable Text. A multi-line text entry field. ! Selection Tree. Displays the feature selection tree.
About Dialog Controls Note (Windows 9x installations only.) If you create a component condition based on a property that is set during the UI Sequence, add the merge module CondFix.msm to the installation. This merge module fixes a Windows Installer limitation. For details, see WiseFixConditions on page 409. ! Control Text The text in the control. For bitmap and icon controls, this stores the key in the binary table in which the bitmap or icon is stored.
About Dialog Controls ! Right Aligned Text Right-aligns text in the control. ! Enabled Enables the control, that is, display it in a state the end user recognizes as clickable. ! Indirect If you mark this, the information for the control is not stored directly in the property for the control. Instead, the value of the control’s property is used as the real property name to store the information in. Example: Suppose a dialog has 3 radio buttons and a checkbox.
About Dialog Controls ! Icon Control Replaces the control’s text with an icon. The control’s text is used as a key to the Binary table to point to the icon data. ! Pushbutton (Checkboxes and radio button groups only.) Draws the control as if it were a pushbutton, although its behavior is not changed. ! Fixed Size Prevents the image associated with the control from being scaled to fit the control size. Instead, the image is cropped or centered in the control.
About Dialog Controls ! Event Select the event to be published. See the following in the Windows Installer SDK Help: ControlEvent Overview for general information on control events. Control Events for details on each control event. ! Argument Enter the argument for the event. If no value is passed for that argument, the event is ignored. See Control Events in the Windows Installer SDK Help; click an event name to see valid arguments.
About Dialog Controls ! Action The action to take when the condition is true. ! Condition If you enter a condition for the event, the event occurs only if the condition is true. If there is no condition, the event always occurs. For details, see Conditions on page 406. Setting the Graphic for a Control The Graphic tab, which appears on the Properties dialog for graphical dialog controls, lets you specify a graphic file for the control. It determines the image displayed in the control.
About Dialog Controls ! Font Property Select the property that defines a font. In most cases, select _WiseDialogFontDefault to match the default text of other text on dialogs. To define a new font style, add a new row to the TextStyle table in Setup Editor > Tables tab. Then create a new property, and enter the new text style’s name, surrounded by curly brackets, as the property value. ! Control Font You can click Set Font and select a font for the control.
About Dialog Controls • Vertically. Center within the top and bottom edges of the dialog. • Horizontally. Center within the left and right edges of the dialog. All selected controls are centered in the dialog. Making Dialog Controls the Same Size You can make multiple controls on a dialog the same size. 1. In Setup Editor > Dialogs tab, select a dialog in the left pane. 2. In the right pane, select 2 or more controls.
About Billboards About Billboards Billboards consist of a series of text and images that are dynamically displayed on a dialog during installation. Typically, billboards highlight features of the program being installed, promote related products, or encourage product registration. A billboard is associated with an action, and is displayed while that action is performed during installation. A billboard consists of: ! The billboard.
About Billboards 3. Click the small outline and resize and move it to accommodate the content items you plan to add. You can adjust it later. Note Although a default billboard area is already created, you also can create your own. Rightclick the dialog and select Add > Billboard. On the Properties dialog that appears, click the Events tab. Make sure the Subscribe to Event list contains an entry where Event is set to SetProgress and Attribute is set to Progress. 4.
About Billboards The controls you create do not appear on the dialog. You can only see their content items, which you add in the next step. 5. Add content items to each billboard control: • Right-click the dialog and select Billboards > BillboardControlName, where BillboardControlName is the name of the control. This makes the control active. • Right-click the dialog, select Billboards > Add Control, and select Bitmap, Icon, or Text. A properties dialog appears.
Obtaining Logon Information From a Dialog Obtaining Logon Information From a Dialog " Operating system requirement. Installations that contain the Logon Information dialog can be run on Windows NT 4, Windows 2000, and Windows XP only. Often, server software must be configured after installation to run under a particular user with certain permissions. To help with this process, you can add the Logon Information dialog to an installation.
Obtaining Logon Information From a Dialog 2. In the Categories list, select Wise Files. 3. In the Templates list, select Server Application Project and click Open. 4. In Setup Editor > Dialogs tab, select the Logon Information Dialog and edit the dialog text as needed to communicate its purpose to the end user installing your application. To add the Logon Information dialog to any installation: 1.
About the SQL Connection Dialog About the SQL Connection Dialog " Professional and Enterprise Editions only Add the SQL Connection dialog to an installation to: ! Let the end user select a SQL Server name and security credentials to generate a valid SQL Server connection string. ! Populate the WISE_SQL_CONN_STR property with the valid connection string. When the end user completes the SQL Connection dialog and clicks Next, the installation creates and tests the connection string.
About the SQL Connection Dialog (In the Visual Studio integrated editor) To create a new installation that contains the SQL Connection dialog: 1. Select File menu > New > File. 2. In the Categories list, select Wise Files. 3. In the Templates list, select Server Application Project or Web Application Project and click Open. 4. In Setup Editor > Dialogs tab, select SQL Connection Dialog and edit the dialog text as needed to communicate its purpose to the end user who installs your application.
About the SQL Connection Dialog From: To: WiseSqlServerName|WiseSqlAuth|WiseSqlUser|WiseSq lPass|WISE_SQL_CONN_STR WiseSqlServerName1|WiseSqlAuth1|WiseSqlUser1|Wis eSqlPass1|WISE_SQL_CONN_STR1 6. Use the new property for the connection string in the SQL script that executes the connection with the additional SQL Server. See Setting SQL Connection Strings on page 227. Example: Use the WISE_SQL_CONN_STR1 property for the connection string.
Adding the Custom Property Dialog Adding the Custom Property Dialog " Professional and Enterprise Editions only The Custom Property Dialog lets you specify Windows Installer properties that can be set by the end user during installation. You might use this if there are environmentdependent values that you cannot predict, which must be provided by the end user, such as user names and passwords.
Chapter 20 OLE Automation " Professional and Enterprise Editions only. The Macro Editor is not available in the Visual Studio integrated editor. Use OLE functions and objects to automate installation tasks. Topics include: ! About OLE Automation. ! About Macro Files. ! Creating, Editing, and Running a Macro. ! About the Macro Editor Window. ! OLE Automation Function Reference. ! OLE Automation Object Reference. ! Visual Basic Functions.
About OLE Automation About OLE Automation " Professional and Enterprise Editions only. You can write macros that use OLE Automation functions and objects to automate installation tasks. Example: You can write a macro that always places certain files in certain locations upon making a new installation, or that makes certain files Read-only when you add them to an installation.
About Macro Files About Macro Files " Professional and Enterprise Editions only. The Macro Editor is not available in the Visual Studio integrated editor. Use the Macro Editor to create and edit macro files. The default macro file in the Templates folder (Macros.wbs) contains sample macros. These samples are commented out, which means that you can view the script in the Macro Editor but you can’t run the macros unless you uncomment the script. You can add macros to Macros.
About Macro Files • Pathname When you create a new macro, it is added to the macro file displayed. To add the new macro to a different .WBS file, browse to the file’s location. To create a new .WBS file, click New and specify the file. 3. Click Create. The Macro Editor window appears. See About the Macro Editor Window on page 458. 4. In the script box, write the macro. 5. In the Macro Editor, select File menu > Save. 6.
About Macro Files Events That Can Trigger a Macro " Professional and Enterprise Editions only. The Macro Editor is not available in the Visual Studio integrated editor. Using the Macro Editor, you can write macros for OLE Automation events. Example: If you write a macro for the AddFile event, the macro runs every time you add a file to an installation. See Creating, Editing, and Running a Macro on page 455. Event What you could do with a macro AddFile Have each .DLL or .
About the Macro Editor Window About the Macro Editor Window " Professional and Enterprise Editions only. The Macro Editor is not available in the Visual Studio integrated editor. Caution You should be familiar with macros and comfortable with Visual Basic to use this feature. For information on Visual Basic, visit msdn.microsoft.com/vbasic/ The Macro Editor window with all its functions is very similar to the Microsoft Visual Basic window.
About the Macro Editor Window ! List Functions Displays a global list of Wise Solutions and Visual Basic functions. For help on Visual Basic functions, visit msdn.microsoft.com/vbasic/. For help on Wise Solutions functions, see OLE Automation Function Reference on page 460. ! Check Syntax Checks the macro for the correct syntax. ! Revert to Saved Reverts the current macro to the last saved version, to undo any changes you’ve made since you last saved.
OLE Automation Function Reference OLE Automation Function Reference " Professional and Enterprise Editions only. The Macro Editor is not available in the Visual Studio integrated editor. This section lists the OLE Automation functions you can call with a macro to automate Wise for Windows Installer. Each function is briefly described and followed by a table. Most tables include: function prototype, parameters, and return values. Also see OLE Automation Object Reference on page 476.
OLE Automation Function Reference Parameters strFeature: name of the feature to add the MTS/COM+ application to strName: MTS/COM+ application name or ID bServer: TRUE to install the server portion of the MTS/COM+ application; FALSE to install the client portion strRemoteServerName: for a client installation, the name of the computer on the network that contains the MTS/COM+ server application to which the client connects Attr: sets attributes of the COM+ application 2 for a client install 4 to not refresh
OLE Automation Function Reference AddFeature Adds a feature to the installation. Allows for the specification of all aspects of a feature in Windows Installer.
OLE Automation Function Reference Function Prototype BSTR AddFile(BSTR szSourcePath, BSTR szDestination, short iAttributes, BSTR szFeatureComponent, short iType, BSTR FAR* pszComponentKey) Parameters szSourcePath: source path of file to add szDestination: destination path for file (including file name) short iAttributes: Bitmask for the file; ORed values of: 1 for Read-only 2 for Hidden 4 for System 512 for vital file 1024 for file contains a checksum 8192 for file is uncompressed outside of the .
OLE Automation Function Reference AddMergeModule Adds a merge module to the specified feature and directory. You can add a merge module to multiple features by making multiple calls to this function, with each call adding the same module to a different feature. In the case of multiple features, the szDirectory parameter is ignored after the first call for a particular module.
OLE Automation Function Reference AddRegistryValueEx Adds a registry key to a component or feature. This function is identical to the AddRegistryValue function, except that the last parameter is a pointer to a VARIANT type for VBScript compatibility. The VARIANT type is BSTR.
OLE Automation Function Reference Function Prototype BSTR AddShortcut(short sShortcutType, BSTR szFileOrCommand, BSTR szFeature, BSTR szName, BSTR szDirectory, BSTR szArgs, BSTR szDescription, BSTR szWorkingDir, long lHotKey, short sShowWindow, short sIconNumber, BSTR szFeatureComponent, short iType, BSTR FAR* pszComponentKey) Parameters sShortcutType: 1 for advertised 2 for file in installation 3 for command line szFileOrCommand: filekey if file in install or command line szFeature: feature for adverti
OLE Automation Function Reference Function Prototype BSTR AddShortcutEx(short sShortcutType, BSTR szFileOrCommand, BSTR szFeature, BSTR szName, BSTR szDirectory, BSTR szArgs, BSTR szDescription, BSTR szWorkingDir, long lHotKey, short sShowWindow, short sIconNumber, BSTR szFeatureComponent, short iType, BSTR FAR* pvComponentKey) Parameters sShortcutType: 1 for advertised 2 for file in installation 3 for command line szFileOrCommand: filekey if file in install or command line szFeature: feature for advert
OLE Automation Function Reference Function Prototype HRESULT AddVirtualDirectory(BSTR strFeature, BSTR strName, BSTR strDirectory, BSTR strAppName, BSTR strDefaultDoc, BSTR strWebserverName, ApplicationProtection lAppProtection, ExecutePermission lExecutePerm, VirtualDirectoryAttributes lAttr, VARIANT_BOOL *retval) Parameters strFeature: name of the feature that, when installed, causes the virtual dirtectory to be added strName: the name associated with the virtual directory’s alias strDirectory: name o
OLE Automation Function Reference Function Prototype BOOL AddWildcard(BSTR szFeature, BSTR szCondition, BSTR szIncludes, BSTR szExcludes, BSTR szSrcDir, BSTR szDestDir, long lAttributes, long lCompAttributes) Parameters szFeature: feature to which to add wildcard szCondition: condition for file components created szIncludes: list of wildcards to include, delimited by semicolons szExcludes: list of wildcards to exclude, delimited by semicolons szSrcDir: source directory to read for file list szDestDir: d
OLE Automation Function Reference EnableExceptions Turns on exceptions for automation functions. Exceptions are thrown for OLE Automation objects. Exceptions are handled in Visual Basic using On Error statements to catch all errors. Function Prototype void EnableExceptions(BOOL bEnable) Parameters bEnable: TRUE to enable exceptions EnableRelease Enables or disables a release or all releases in a .WSI. To enable or disable all releases, pass a blank string into EnableRelease().
OLE Automation Function Reference GetProperty Retrieves the value of a property. Property names in Windows Installer are casesensitive. Function Prototype BSTR GetProperty(BSTR lpszProperty) Parameters lpszProperty: case-sensitive property of which to retrieve value Return Value Value of given property; empty string if property does not exist New Creates a new Windows Installer file. This can only create .MSI and .MSM files.
OLE Automation Function Reference QueryDisplayValidation Use the QueryDisplayValidation event in a macro to suppress the display of Package Validation error messages associated with individual Internal Consistency Evaluators (ICE).
OLE Automation Function Reference Function Prototype BOOL Save(BSTR szPathName) Parameters szPathName: absolute path to the destination to which the file is saved Return Value Nonzero if successful SetComponentGuid Sets the ComponentId column of a component. Components for files should be the same across all products and all versions of a product. Example: You could have this function follow an AddFile call, passing the component returned in AddFile to SetComponentGuid.
OLE Automation Function Reference Function Prototype BOOL SetFileSelfRegister(BSTR szFileKey, BOOL bRegister) Parameters szFileKey: key of file row, returned by AddFile and AddFileEx bRegister: TRUE to add SelfReg row, FALSE to delete it Return Value Nonzero if successful. Failure occurs if file key not found. SetMediaOption Changes media options through automation. Media options cover the type of output file that is created, such as single-file .EXE or an .
OLE Automation Function Reference Function Prototype BOOL SetProperty(BSTR szProperty, BSTR szValue) Parameters szProperty: case-sensitive property name szValue: new value for property Return Value Nonzero if successful VBScript Example (lines are numbered for clarity): 1. installer.SetProperty "ProductName", "My Product" SetRestartIIS Determines whether Microsoft Internet Information Server (IIS) is restarted for this feature.
OLE Automation Object Reference OLE Automation Object Reference " Professional and Enterprise Editions only. The Macro Editor is not available in the Visual Studio integrated editor. This section lists the OLE Automation objects you can use in a macro to automate Wise for Windows Installer. Each object is briefly described and followed by a table. Most tables include: child of, properties, and methods. Also see OLE Automation Function Reference on page 460. WColumn This is a single column for a row.
OLE Automation Object Reference WColumnDef This is a single-column definition for a table. Child of WColumnDefs Properties BSTR Name: name of the column VBScript Example (lines are numbered for clarity): 1. 2. 3. 4. 5. 6. 7. 8. ' assume tblControl is assigned to the Control table Dim coldef As WColumnDef For Each coldef In tblControl.WColumnDefs MsgBox coldef.Name Next ' get specific column Set coldef = tblControl.WColumnDefs("Control") Set coldef = tblControl.
OLE Automation Object Reference Child of WRows Properties Key(): key value for this row Data(VARIANT vIndex): default property to get and set data for a column based on zerobased index or column name WColumns WColumns: get the collection of WColumns for this row Methods AccessBinaryData(VARIANT vIndex,BinaryRead Write bdWrite,BSTR filePath,BOOLEAN bLink): vIndex - name of column or zero-based bdWrite - 1 is write to file, 0 is read from file (there are enumerations bdWriteToFile and bdReadFromFile fil
OLE Automation Object Reference WTable This is a single table in the current .MSI or .MSM. Child of WTables Properties BSTR Name(): returns the name of the table BSTR Keys(): returns a comma-separated list of keys for the table Methods WRows WRows(): returns the collection of rows for this table WColumnDefs WColumnDefs(): returns the collection of column definitions for the table WRow NewWRow(BOOL bAddToTable): creates a new row for this table.
Visual Basic Functions Visual Basic Functions " Professional and Enterprise Editions only. The Macro Editor is not available in the Visual Studio integrated editor. Although the Macro Editor gives you access to the following Visual Basic functions, they are not documented by Wise Solutions. For information on Visual Basic, visit msdn.microsoft.com/vbasic/.
Chapter 21 Debugger for Windows Installer " Professional and Enterprise Editions only. The Debugger for Windows Installer is an easy-to-use tool that lets you step through an installation to isolate and resolve problems. You can view the installation’s actions and their properties, the installation database tables, and the Windows Installer log file, and you can evaluate conditions. Use the debugger when an installation doesn’t perform as you anticipated and you can’t readily determine why.
About the Debugger About the Debugger " Professional and Enterprise Editions only. The Debugger for Windows Installer runs an installation, which can be an .MSI, a .WSI, or a transform (.MST), and lets you see exactly what it is doing at any time. As the installation runs, the debugger displays temporary Windows Installer properties that you can change to see how they affect the installation.
About the Debugger the right-click menu in the Actions, Properties, Condition Evaluator, and Log panes for these additional options: ! Float as MDI Window Change the pane to a window with a tab in the Table List pane. To dock it again, right-click in the window and clear this option. ! Allow Docking Dock a pane when you drag it near an edge of the screen. When this option is not marked, the pane does not dock regardless of where you drag it. You can also prevent docking by pressing Ctrl while dragging.
Running the Debugger Running the Debugger " Professional and Enterprise Editions only. The debugger runs through the actions in the Normal Installation mode only. It cannot debug the Administrative or Advertisement installations. 1. In Wise for Windows Installer, open the .WSI, .MSI, or .MST to debug. 2. Click the Debug button. (In Visual Studio: In Solution Explorer, right-click the installation project icon and select Set as Startup Project. Then select Debug menu > Start.
Running the Debugger To clear a breakpoint: Click an action with a breakpoint and press F9. To clear all breakpoints at once, press Ctrl + Shift + F9. Evaluating Conditions " Professional and Enterprise Editions only. To display the Condition Evaluator pane, select View menu > Condition Evaluator. This pane lets you test conditions without having to add them to the installation. You enter the condition or conditions in the Condition Evaluator, and then run the installation in the debugger.
Chapter 22 Using MSI Script MSI Script provides a powerful yet easy-to-use environment for editing Windows Installer installation sequences, even if you are not familiar with the underlying Windows Installer technology. A sequence is a set of actions that are performed during a particular type of installation. Topics include: ! The MSI Script Window. ! About MSI Script. ! About Installation Modes ! About Installation Sequences. ! Editing Sequences. ! Calling WiseScripts with Custom Actions.
The MSI Script Window The MSI Script Window To access MSI Script, click the MSI Script tab at the bottom of the main application window. Installation Mode Restricted Areas Actions Sequences ! Installation Mode Installation modes represent the different ways an installation can be run. Choose whether to work on a normal installation, an advertisement installation, or an administrative installation. See About Installation Modes on page 488.
About MSI Script About MSI Script MSI Script contains the sequences of actions that make up an installation. The action sequences are pre-defined following the Windows Installer guidelines for creating sequences. The actions are in the recommended order, and, where appropriate, conditions are set. We recommend that you do not delete or move any standard actions. See Standard Actions Reference in the Windows Installer SDK Help. The existing action sequences are sufficient for most installations.
About MSI Script Also see: Command Line Options in the Windows Installer SDK Help Performing an Administrative Installation on page 283 Advertisement Installation Select this installation mode to edit the sequences that are run during an advertisement installation. An advertisement installation places entry points, such as shortcuts, on the destination computer without actually installing the application.
About MSI Script Adding a Custom Action to Multiple Sequences When you copy and paste an action between sequences, an entirely new copy of that custom action is stored in the installation database. To avoid this duplication and possible use of extra disk space, you can assign an action to multiple sequences. 1. Select MSI Script. 2. From Installation Modes, select All Custom Actions. This displays a list of all custom actions in this installation. 3. In the Actions list, double-click the action. 4.
About MSI Script the service. The Windows Installer service can run with elevated privileges based on policies, and the Windows Installer database runs with the current user’s privileges. When you add custom actions, you can specify whether they should be run with elevated privileges (system context) or with user privileges (user context). Set privileges to user context or system context in the In-Script Options field on the Properties tab of the custom action details dialog.
Editing Sequences Editing Sequences Use the commands on the Edit menu, the right-click menu, or the tools on the toolbar to edit an MSI Script sequence. You can edit only one action at a time, but you can cut, copy, or paste several actions at a time. To edit an action, select its installation mode, click its sequence tab, and select the action from the Installation Sequence pane.
Editing Sequences Adding and Editing Actions To add an action to an MSI Script sequence, do one of the following: ! Drag and drop the action Drag the action from the Actions list onto a line in the Installation Sequence list. The new action appears before the line that is highlighted when you drop the action. ! Double-click the action In the Installation Sequence list, select the line above which the new action should appear and double-click the action in the Actions list.
Calling WiseScripts with Custom Actions Calling WiseScripts with Custom Actions The Run WiseScript custom actions provide the ability to call WiseScripts. WiseScript technology provides many specialized functions that are not available in or are difficult to do with Windows Installer technology. In a WiseScript, you can use special actions that let you pass information between the main Windows Installer installation and the WiseScript .EXE that is being called.
Calling WiseScripts with Custom Actions Examples of WiseScripts You Run From an .MSI This section provides illustrations of how to use WiseScripts called by a Windows Installer installation. For information on which WiseScript editing tool comes with your software, see WiseScript Editing Tools.
Calling WiseScripts with Custom Actions begin with S. The serial number the end user enters during installation determines the license file that gets installed, which determines which features are turned on. You set up the installation to have the license files installed by the WiseScript instead of the .MSI so that the license files are embedded in the WiseScript .EXE and cannot be opened. Do the following: 1.
Calling WiseScripts with Custom Actions Example: You have an .MSI named Core and a WiseScript named CorePlus. CorePlus includes an Install File(s) script action that installs a file named A.dll. You want to make sure that A.dll gets uninstalled when Core is uninstalled. In the Core .MSI, do the following: 1. Select MSI Script and click the Execute Immediate tab. 2. Scroll down and click directly below the RemoveExistingProducts action. 3. Add an If Statement with a value of NOT Installed.
Calling WiseScripts with Custom Actions 3. Add an Open/Close INSTALL.LOG script action with Open new installation log marked and the log file path specified as %MAINDIR%\install.log. This causes the WiseScript to create a log in the installation directory. 4. Add an Install File(s) script action and set: • Source Pathname for Unwise32.exe • Destination Pathname to %MAINDIR%\Unwise32.exe. Unwise32.exe is located within the WiseScript Express directory under the Wise for Windows Installer directory.
Guidelines for Using Custom Actions Guidelines for Using Custom Actions When you use Windows Installer to install a file, it takes care of the repair and management of the file. When you use a custom action to change an installation, you take Windows Installer out of the loop. (Example: If you use a custom action to install a file, you must also include custom actions to repair or uninstall the file because Windows Installer is unaware of the file.
Guidelines for Using Custom Actions If the action does this: Place it in this sequence: Depends on a previous action in order to run Execute Deferred Windows Installer does not perform the action when it runs in Immediate mode. If a custom action depends on a change to the system, and the change has not yet been made, the custom action fails. Requires elevated privileges to run Execute Deferred Actions run in Deferred mode can be run under the system context.
Guidelines for Using Custom Actions To Run Only During Uninstall If the product is being uninstalled, the REMOVE property is set to All or ALL. To run a custom action during uninstall only, set its condition to REMOVE~=”ALL”. (The ~ causes the comparison to be case-insensitive.) Guidelines for Nested Installation Custom Actions You can call another installation from within the running installation with an Install MSI custom action.
Guidelines for Using Custom Actions The return values for nested installation actions are the same as for other custom actions. See Custom Action Return Values in the Windows Installer SDK Help. Guidelines for Calling VBScripts and JScripts You can create a custom action that calls a JScript or VBScript file that you’ve authored. You cannot pass parameters to JScript or VBScript.
Guidelines for Using Custom Actions custom action is added to the installation to enable this passing of parameters. See Custom Actions That Are Added Automatically on page 505. In the User Interface or Execute Immediate sequences, you can send Windows Installer properties to the .DLL function as parameters. The property’s current value is passed to the function, and, if the function changes that value, the new value is put into the corresponding property.
Launching a Custom Action from a Dialog Launching a Custom Action from a Dialog You can use a control on a dialog to launch a custom action. Example: You can set a button so that if the end user clicks it, the custom action runs. 1. Select MSI Script. 2. From Installation Mode, select All Custom Actions. 3. Create a new custom action and configure it normally, but mark No Sequence on the Location tab. The action is not added to any sequence. 4.
Custom Actions That Are Added Automatically Custom Actions That Are Added Automatically Wise Solutions provides several custom actions to add functionality that is not available with Windows Installer’s standard actions. When you use certain features, such as custom actions that call a .DLL, Wise custom actions are added to the installation. Removing the Wise custom actions might cause problems with the installation.
Troubleshooting Custom Actions Troubleshooting Custom Actions If a custom action doesn’t work: ! Try moving it to a different sequence, or to a lower position in the current sequence. ! Does the custom action require elevated privileges? If so, try running it in the Execute Deferred sequence. On the custom action’s Properties tab, set the In-Script Options drop-down to Deferred Execution - System Context. ! Make sure the custom action name is unique.
Chapter 23 Custom Action Reference While Windows Installer provides standard actions that perform most functionality you need in an installation, occasionally you might need additional functionality not available in standard actions.
! Function Name Type the name of the function within the .DLL file to call. ! Parameter List In the parameter list, specify the parameters to send to the .DLL. ! Return Value Type Select the data type of the return value that is returned from the .DLL. ! Returned Property Type or select a property name. The return value of the function call will be put into this property. Also see: Guidelines for Calling .DLLs on page 502 Configuring .
Also see: Guidelines for Calling .DLLs on page 502 Configuring .DLL Parameter Settings on page 510 Guidelines for Custom Action Location on page 499 Using the Custom Action Properties Tab on page 534 Using the Custom Action Location Tab on page 532 Call Custom DLL From Installed Files This custom action calls a .DLL file that is installed by this installation. Use this custom action to call the .DLL during installation, while leaving the .DLL on the destination computer as part of the installation.
Configuring .DLL Parameter Settings When you add a Call Custom .DLL custom action, use the DLL Parameter Details dialog to add parameters. To access this dialog, double-click one of the Call Custom .DLL actions in MSI Script, and click the Add button. In the Execute Immediate or User Interface sequences only, you can send Windows Installer properties to the .DLL function as parameters.
! Custom Action Name Enter a unique name that begins with a letter or underscore. It can contain numbers and periods. It must not match the name of any Windows Installer standard action. See Standard Actions Reference in the Windows Installer SDK Help. ! DLL File Specify a .DLL from your hard drive or local network to call during installation. ! Function Name Type the name of the function within the .DLL file to call. Also see: Guidelines for Calling .
Call JScript From Embedded Code This custom action runs JScript code that is embedded inside this custom action. Tips ! The script is limited to 255 characters; use other JScript custom actions for longer scripts. ! The destination computer must contain the script’s runtime. Usage Double-click the custom action and complete the Details tab: ! Custom Action Name Enter a unique name that begins with a letter or underscore. It can contain numbers and periods.
! Script Function Call (Optional.) Type the name of the function within the script to call. ! Run Script in Win64 Process Mark this if the script file is 64-bit. If the script file is 32-bit, leave this cleared. (Available only in 64-bit installations.
Call JScript From Property This custom action runs JScript code that is stored inside a Windows Installer property. You might store the script in a property if part or all of the script needs to be generated dynamically based on end user input or system configuration. Tips ! The script is limited to 32 Kb, which is the size limit for Windows Installer properties. ! Use the script to read and write properties to the installation. ! The destination computer must contain the script’s runtime.
! Run Script in Win64 Process Mark this if the script file is 64-bit. If the script file is 32-bit, leave this cleared. (Available only in 64-bit installations.) ! Enter the VBScript to execute ! Type or paste the script text. Code elements, such as function names, declarations, and values, are color-coded. You can use bracketed property names, table keys, environment variable references, and other special substrings. See Formatted in the Windows Installer SDK Help.
Call VBScript From Installed Files This custom action runs code from a VBScript file that is installed by this installation. Use this to call the script file during installation, while leaving the file on the destination computer as part of the installation. Tips ! First add the file to be called to the Files page in Installation Expert.
! Custom Action Name Enter a unique name that begins with a letter or underscore. It can contain numbers and periods. It must not match the name of any Windows Installer standard action. See Standard Actions Reference in the Windows Installer SDK Help. ! Property. Specify a property that stores the script, either by selecting a property or typing a new property name. Elsewhere in the installation, populate this property with the script text. ! Script Function Call (Optional.
Download File From Internet This custom action downloads a file from the Internet. Tips ! If you place this action in the User Interface or Execute Immediate sequences, you can use formatted text strings, such as [INSTALLDIR], in the Source URL and Destination Directory fields. See Formatted in the Windows Installer SDK Help. ! If you place this action in the User Interface or Execute Immediate sequences, you cannot display progress bar text.
Execute Program From Destination This custom action calls an .EXE file that already resides on the destination computer. Use it to call .EXE files that are common to all Windows computers, such as notepad.exe. A tutorial demonstrates this custom action in the Wise for Windows Installer Getting Started Guide. Usage Double-click the custom action and complete the Details tab: ! Custom Action Name Enter a unique name that begins with a letter or underscore. It can contain numbers and periods.
! Executable File Specify an .EXE file from your computer or local network. The .EXE file will be stored in the Binary table of the installation. ! Command Line (Optional) Enter any command line options to pass to the .EXE file.
! Custom Action Name Enter a unique name that begins with a letter or underscore. It can contain numbers and periods. It must not match the name of any Windows Installer standard action. See Standard Actions Reference in the Windows Installer SDK Help. ! Property Specify a property that will store the path and name of the .EXE. Select a property or type a new property name. ! Command Line (Optional) Enter command line options to pass to the .EXE file.
Usage Double-click the custom action and complete the Details tab: ! Custom Action Name Enter a unique name that begins with a letter or underscore. It can contain numbers and periods. It must not match the name of any Windows Installer standard action. See Standard Actions Reference in the Windows Installer SDK Help. ! Product Code Either enter or copy and paste the product code of the nested installation. The product code is stored in a property named ProductCode.
! Custom Action Name Enter a unique name that begins with a letter or underscore. It can contain numbers and periods. It must not match the name of any Windows Installer standard action. See Standard Actions Reference in the Windows Installer SDK Help. ! Installation to Run Specify the .MSI to run from your computer or local network. The installation must be in .MSI format, and must not include external compressed or uncompressed files.
! Custom Action Name Enter a unique name that begins with a letter or underscore. It can contain numbers and periods. It must not match the name of any Windows Installer standard action. See Standard Actions Reference in the Windows Installer SDK Help. ! Installation to Run Enter the relative pathname of the .MSI to run. Example: If this installation is located at the top level of a CD (F:\), and the nested installation is at F:\SubInstall\second.msi, enter the following: SubInstall\second.
! Shaded areas of MSI Script indicate restricted placement for this custom action; because this custom action calls an installed file, it must run after files are installed. Also see Guidelines for Custom Action Location on page 499. Pause Installation This custom action temporarily stops a sequence from executing. After the specified number of seconds, the sequence continues running. This action must be placed in the Execute Deferred sequence.
! Text to Post The text to post should be one or more lines in the format field=data, where field is the name of the field expected by the Web application, and data is the data to populate the field. If a line does not appear to contain a field name followed by =, it is assumed to be a continuation of the previous line, and the data on the 2 lines is concatenated and sent with a single field identifier. For information on using formatted text, see the tips above .
! Custom Action Name Enter a unique name that begins with a letter or underscore. It can contain numbers and periods. It must not match the name of any Windows Installer standard action. See Standard Actions Reference in the Windows Installer SDK Help. ! WiseScript .EXE File Specify an executable file on the destination computer that was compiled in a WiseScript editing tool.
! WiseScript .EXE File Specify an executable file on your computer or network that was compiled in a WiseScript editing tool. The file you select will be copied into the Binary table of this installation. Optionally, you can use the Options button below. ! Options button • Browse for WiseScript Select a WiseScript .EXE file on your hard drive or network and places its path in the WiseScript .EXE File field. • Create New WiseScript Open a new WiseScript in a WiseScript editing tool.
Usage Double-click the custom action and complete the Details tab: ! Custom Action Name Enter a unique name that begins with a letter or underscore. It can contain numbers and periods. It must not match the name of any Windows Installer standard action. See Standard Actions Reference in the Windows Installer SDK Help. ! WiseScript .EXE File Specify an executable file contained in this installation that was compiled in a WiseScript Editing tool. Optionally, you can use the Options button below.
! Directory Specify the directory to change the value of. It must be a directory you’ve added to this installation or a predefined Windows system directory, which appears when you browse. Do not enclose the directory property with brackets. ! Directory Value Enter the new path of the directory. You can use property and directory names by enclosing them in brackets.
! Custom Action Name Enter a unique name that begins with a letter or underscore. It can contain numbers and periods. It must not match the name of any Windows Installer standard action. See Standard Actions Reference in the Windows Installer SDK Help. ! Property Select a property from the list, or enter a new property name. Do not enclose this property name with brackets. ! Property Value Enter the value to set the property to.
Using the Custom Action Location Tab Using the Custom Action Location Tab The Location tab appears for custom actions only if you are working in the All Custom Actions installation mode. The All Custom Actions installation mode lists all the custom actions that are part of this installation, which are stored in the CustomAction table. Also see All Custom Actions on page 489.
Using the Custom Action Location Tab for Merge Modules Using the Custom Action Location Tab for Merge Modules The merge module version of the Location tab only appears for custom actions if you are working in a merge module (.WSM or .MSM file). It is a different version of the Location tab than the one that displays in a standard installation (.WSI or .MSI file). Use this tab to set the location for a custom action in a merge module. Also see All Custom Actions on page 489.
Using the Custom Action Properties Tab Using the Custom Action Properties Tab The Properties tab appears on the details dialog for most custom actions. However, sometimes options are disabled or display different choices based on what kind of custom action you added and where you added it. In this dialog, you set options that determine when and how the custom action is run. In-Script Options This determines when the custom action is executed.
Using the Custom Action Properties Tab changes to the system. Rollback actions run in deferred execution mode and cannot run asynchronously. See Rollback Custom Actions in the Windows Installer SDK Help. ! Commit only Select this if the action should be executed later, during installation of the commit script, which is invoked upon successful completion of the installation script. Commit actions run in deferred execution mode. See Commit Custom Actions in the Windows Installer SDK Help.
Using the Custom Action Properties Tab actions. This option is not supported for Install MSI custom actions or if you selected Rollback Only in the In-Script Options list above. Scheduling Options If you add the custom action to both the UI Sequence and the Execute Sequence, but you want to limit the number of times it actually runs, select an option here. See Custom Action Execution Scheduling Options in the Windows Installer SDK Help.
Chapter 24 Windows Installer and .NET Technologies Wise products integrate closely with Microsoft Windows technologies. The installations you create are in Microsoft Windows Installer format and are run on the destination computer by the Windows Installer engine. Wise for Windows Installer is an authoring environment for Microsoft’s Windows Installer service. It also supports Microsoft’s .NET Framework. Although a comprehensive discussion of Windows Installer and .
About Microsoft Windows Installer About Microsoft Windows Installer To create a streamlined process for installing and managing applications, Microsoft developed the Windows Installer service. It consists of a set of guidelines, an Application Programming Interface, and a runtime service to help make application installation and ongoing management part of the basic Windows system services.
About Microsoft Windows Installer Wizard\ on the destination computer. These .MSI files do not have to be left on the destination computer, but if they are, the end user does not need the source media to repair or reinstall an installation. What if your end users don’t have Windows Installer? The Windows Installer runtime is built into the Windows 2000, Windows XP, and Windows Me operating systems.
About Microsoft Windows Installer Working With Components and Features In Microsoft Windows Installer terminology, a feature is a distinct part of an application’s functionality, which end users can usually choose to install. (Example: A feature could be a spell-checker, a thesaurus, or a collection of clip art.) You create and organize features yourself. See Strategies for Organizing Files Into Features on page 108.
About Microsoft .NET Technology About Microsoft .NET Technology Microsoft’s .NET platform is a family of products that provide tools for developing, server infrastructure for managing, and building block services and client software for using XML services. The .NET Framework, which is a .NET development tool, is an environment for building, deploying, and running XML Web services. It consists of several parts, including the common language runtime, which is the engine at the core of managed code execution.
About Microsoft .NET Technology Search for “Interoperating with Unmanaged Code” in the MSDN Library (msdn.microsoft.com/library/). What is an assembly? An assembly is the primary building block of a .NET application. An assembly contains its own naming, binding, versioning, deployment, and configuration information.
About Microsoft .NET Technology I thought .NET meant I could use XCOPY to install applications without registration. Why do I need to build a Windows Installer installation? For a .NET application that uses only managed code and private assemblies, the installation process can be as simple as copying files to the destination computer. Most developers, however, still need to create a compressed, single-file installation that is easy to deploy and that provides a friendly interface to the end user. .
About Microsoft .NET Technology You can install assemblies into the Global Assembly Cache, the WinSxS directory, or a private directory. For information on how each of these directories is used, see Adding .NET Assemblies to the Installation on page 130. 3. For assemblies that are to be installed into the Global Assembly Cache or WinSxS, generate publicKeyTokens and sign the assemblies.
Index Symbols .NET about 541 ASP user properties 423 assembly options 45 Compact Framework 242 creating installation 214, 215 file attributes 138 installation, requirements 543 standard 492 stored in Binary table 401 types 492 using conditions 406 Windows Installer 492 Actions list 487 activating prompts 53 Add button disabled 26 name 100 watching 355 Application Specification for Windows 2000 378 application type options 45 specifying 102 ApplicationUsers 417 .
Index where to use 444 binary resource adding 118 error 119 exporting 117 linking to file 118 properties, changing 117 refreshing 118, 118 saving 117 source file, editing 117 updating 117 updating data 118 Binary table auto-updating 401 editing 401 missing file 119 storing .DLL 508, 510 storing .EXE 519 storing .
Index predefined 68, 69 selecting 64 sharing 54, 63 ComponentRules.
Index window, rearranging 482 debugging .
Index environment variable adding 157 checking the value 411 path variable 323 reading 411 using in condition 408 error compile 29 component 29 found by UpgradeSync 301 in Components tab 391 in Patch Creation 305 save 29 table 29 turning on for functions 470 validation 29, 371 ErrorDialog 417 Eval function 480 Evaluate Windows Installer Condition 494 event dialog control 439 macro 455 event macro about 457 adding 455 editing 456 exceptions turning on for functions 470 exclusion, merge module 333 Exclusions
Index Find Error 401 hidden file 135 INI Files page 152 Find table data 400 Hide Empty Folders/Items 385, 390 InputBox 480 finding text 491 history, showing for project 320 In-Script Options 490, 534 Fix 480 Hitachi 234 Install Dialogs 425 folder See directory setting permissions 136 HKEY_USER_SELECTABLE 151 install MSI from destination 521 from installation 522 from relative path 523 font, in dialog theme 430 FormatCurrency 480 FormatDateTime 480 Home page 28 Hour 480 HTTP protocol 282 HTT
Index about 23 getting help 23 page groups, about 23 page navigation 23 page views, customizing 25 pages, resetting 23 undo changes 23 installation mode 488 installation sequence about 488 defined 490 types of actions 492 Installation Target 102 Installation Type dialog 177, 426 Installation Types page 177 J launching Wise for Windows Installer 75 J# importing 361 project types 360 tips for import 360 Join 480 JScript calling calling calling calling Layout menu 431 LBound 480 LCase 480 Left 480 from f
Index samples 455 Macros.wbs 455 main project/target 86 Maintenance Dialogs 425 MaintenanceMode 418 Major upgrade 301 MAKECAB.
Index multiple-language release 182 digital signature 48 general 43 Installation Expert 51 merge modules 52 prompts 53 repository 54 resource sharing 54 source control 55 target platform 56 Visual Studio .NET 57 MYPASSWORD 447 MYUSERNAME 447 N name of product 100 nested installation on destination computer 521 relative to base 523 substorage 522 tips for running 501 uninstalling 501 NET See .
Index permissions for directories 136 for files 136 for registry 150 PIDTemplate 418 platform See target platform platform support mobile devices 239, 242 platform version 244 Pocket PC 234, 238 compiling 240 desktop computer 251 file information 246 files 245 information 241 installation, creating 239 overview 238 platform version 244 platforms 239, 242 registry information 248 shortcut 250 Post Data to HTTP Server 525 preferences Also see options prerequisites adding 190 command line, specifying 190 laun
Index sharing language settings 258 sharing settings 185 turning features off 184 release notes 15 Release Settings page choosing release 27 customizing release 183 customizing summary 184 defining features 184 sharing settings 185 working with 183 Releases page 180 remark action 526 remarks, adding to .
Index SetSilent function 475 settings, installation project 84 Setup Editor about 380, 381 tabs 381 Setup Wizard 76, 79 SetupCapture 354 Sgn 480 share point directory about 35 changing 54 editing contents 36 subdirectories 32 temporary file 32, 36 where to locate 35 shared assembly 130 Shared Files report 37 Shared Registry report 37 shared resources file 140 registry 150 short file name 284 shortcut adding to installation 154 advertised 154 editing 155 for mobile device 250 functions 465, 466 Shortcuts pa
Index associated page view 24 convert InstallShield Professional 356 convert SMS Installer or WiseScript 358 creating 60 import Visual Basic 361 import Visual C# 361 import Visual J# 361 language 271 location 32 page view, associating 24, 60 page view, customizing 24, 61 Server application 447 System.
Index setting options 106 WiseScript 496 unmanaged code 541 Update Clean Build 194, 194 update, checking for 18 updating based on wildcards 59 upgrade adding to installation 311, 311 aligning component GUIDs 65 configuring 311 preparing for 298 UpgradeCode 311, 419 selecting 370 selecting rules 373 validation rule about 375 action 377 calling .DLL 374 calling .
Index creating 139 isolating 139 Windows setting required version 167 Windows 2000 locked-down machines 416 service, adding 161 service, controlling 162 support information 106 validation checks 378 Windows application, creating installation 75, 76, 77 Windows CE 238 Windows directory adding file 122 Windows Installer about 537 actions 492 administrative installation 283 comparing files 92 compatibility with 105 database files 74 delaying reboot 190 developer documentation 15 difference from Wise for Windo
Index defined 73 WTable object 479 WTables object 479 wwwroot 217 X exporting to 93 integrating with source control 315 XML editing attributes 141 XML format installation about 93 create during save 44, 93 Y Year 480 560