Step-by-Step Guide to Creating Windows Installer Packages and Repackaging Software for the Windows Installer Using VERITAS WinINSTALL LE
Using VERITAS WinINSTALL LE, you can create Windows Installer (.msi) packages that install applications on client computers. Windows Installer packages are self-contained database files containing the requirements and instructions that the Windows Installer uses when installing applications. This technical guide discusses the procedures for creating and customizing software installation packages for use with the Windows® 2000 operating system.
Nature and Purpose of Repackaging
A Windows Installer package contains instructions on how to install, modify, or remove an application. Windows Installer packages are self-contained database files containing requirements and instructions that the Windows Installer uses when installing applications.
A Windows Installer package is made up of one or more features. For example, Microsoft Word contains a feature called Spell Checker. A feature is made up of one or more components, such as certain dynamic-link libraries (DLLs), shortcuts, or registry entries, and may also contain other features. A component may appear in more than one feature.
Users are likely to be aware of features -- they may think of each feature as providing a particular type of functionality. On the other hand, programmers are more likely to be aware of components, the real details of the application.
Typical instructions in Windows Installer packages include:
For many applications, you can obtain a Windows Installer package from the vendor of the product. These packages are considered native packages and in addition to installing or removing applications, they are self-repairing and can install the features of the application on an as-needed basis.
If you cannot obtain a native Windows Installer package, you can create one with a third party repackaging tool, such as VERITAS WinINSTALL LE, which is available with the Windows® 2000 Server operating system. These repackaged Windows Installer packages contain all the information needed to install, modify, or remove an application.
Scope of the Documentation
This step-by-step guide discusses the procedures for creating and customizing Windows Installer packages using the Discover program and then modifying the package using VERITAS WinINSTALL LE. This guide does not discuss the capabilities and benefits of the Windows Installer. For that information, refer to the Windows Installer Technologies documentation included in Windows 2000 Online Help. Also consult that documentation for an in-depth explanation of advertising -- what it is, what types of advertising are available, how and when the administrator might want to use it.
Whenever possible, this guide uses Microsoft Word 2000 as the sample application that is repackaged in the Windows Installer package.
Requirements and Prerequisites
You must install the Windows 2000 Server operating system, including the Active DirectoryTM service, on a server in your network. You can then run the Administration Tools from the server or from a workstation running the Windows 2000 Professional operating system.
This step-by-step guide assumes that you have run the procedures in parts one and two of A Step-by-Step Guide to a Common Infrastructure for Windows 2000 Server Deployment.
The common infrastructure guides specify a particular hardware and software configuration. If you are not using the common infrastructure, you need to make the appropriate changes to this document. The most current information about hardware requirements and compatibility for servers, clients, and peripherals is available at the Product Compatibility Web site.
In addition to the system requirements for running the Windows 2000 operating system, you should meet the following requirements:
Preparing to Run Discover
Steps Involved in Running Discover
You can create a Windows Installer package by running the Discover program, a stand-alone executable program called DISCOZ.EXE that resides in the WINSTALL directory.
There are three basic steps involved:
The Discover program compares the two snapshots and notes the differences. Using this information, it builds the Windows Installer package. If you desire, you can then edit this package through the Windows Installer Package Editor that is part of the VERITAS Software Console.
Avoiding Problems Using Discover
To avoid problems when creating Windows Installer packages, follow these rules:
Best Practice: > You can use the Windows 2000 Remote OS Installation feature to facilitate the creation of clean computers. This feature reinstalls the Windows 2000 operating system on a computer by downloading a desktop configuration image that is stored on a computer running Windows 2000 Server. For more information on how this works, see the Step-by-Step Guide to Windows 2000 Remote OS Installation.
Selecting the Reference Computer
A reference computer does not need to be an especially powerful computer. It can be less powerful than those your clients use. It will probably not have more than one program or suite on it at a time. Some people find it desirable to have two or three reference computers. The ideal reference computer will be a clean machine. If it cannot be clean, it must be quiet.
What is Clean?
A clean machine is defined as a computer with > only the following installed before you run Discover:
If you install the VERITAS Software Console (or any other products) on the computer, it is by definition no longer a clean machine. You must install the VERITAS Software Console somewhere, but a reference PC is not the place for it.
The reference computer should have access to the Discover program (DISCOZ.EXE) in the WINSTALL directory from either Network Neighborhood, Windows Explorer, or the Run command on the Start menu. Do not map a drive to the WINSTALL share. Doing so may cause Discover to pick up the added drive, and perhaps create a problem in your Windows Installer package.
Why So Much Emphasis on a Clean Computer?
Using a clean reference computer ensures that the Discover program will pick up all files and registry entries necessary for the application to run.
For example, assume that you have some program other than Discover—let’s call it Program XXX—installed on your reference computer. You would be saying, "A computer that starts out with Program XXX already installed is the norm."
Then assume that you ran Discover for an application such as Microsoft Office 2000. The distribution package would contain instructions for installing Microsoft Office 2000 on a computer that already has Program XXX on it. When you installed the application (using the repackaged Windows Installer package) on another computer—one that didn’t already have Program XXX installed—there could be missing files and registry entries.
At that point, the only way to get the package to work would be to install Program XXX on all of the client computers so they match the norm you originally established.
If You Cannot Use a Clean Machine
If you cannot meet the ideal of using a clean reference computer, you must use a quiet one. Follow these recommendations:
Why a Separate Package for Each Application?
One reason not to put more than one application into a single Windows Installer package is that if you receive an update for one of the applications, you would have to rebuild the package from scratch or install unnecessary files. If each application is in a separate Windows Installer package, you need create the package only once, and that package will not rely on another application that is installed on the computer.
Cleaning the Computer Between Packages
If you have used a reference computer to install a program, you should clean that computer before creating the next distribution package. Cleaning it means simply returning it to a condition in which only the operating system and any necessary service packs are installed. A number of commercial products are available to simplify the process.
Because a reference computer need not be powerful and expensive, some people have two or more. Then they can create a distribution package on one computer while returning another to its clean state. This reduces downtime, and therefore reduces the temptation to cut corners by using a computer that has other components installed on it.
The Before Snapshot
When you want to run Discover to create a distribution package, do not run it through the VERITAS Software Console. A computer that has the VERITAS Software Console installed is no longer a clean machine. Using a clean computer is very important when creating Windows Installer packages.
Installing VERITAS WinINSTALL LE
Note: Do not install VERITAS WinINSTALL LE on the computer you will use to run Discover (create packages).
To install VERITAS WinINSTALL LE:
A progress bar appears, and actual installation requires only a few seconds. When it is finished, you can close the window and remove the CD from the drive.
Create the Package
Note: > To find the Discover program on the network, make sure you have the \winnt folder on that server set up as a share with appropriate permissions. Otherwise you will not be able to access it. Do not map a drive to the Program Files share.
The Discover utility uses exception files to determine what areas of the system configuration to exclude from a scan. These exception files are based on default exception files stored in the WinINSTALL Administration Program directory.
The default 32-bit registry exception file is named REG.XCP and the 16-bit file is named REG16.XCP. The default file exception file is named FILES.XCP. The working exception files, REG.XCP or REG16.XCP and xFILES.XCP (where x is the name of each file system exception drive) are created during the Discover process and stored in the Discover working directory.
Note: You need a different exception file for each Windows platform. If XCP files have been renamed or deleted, Discover will create a new XCP file the next time the Discover program is run. If none exists, we recommend that you delete any XCP files in the WinINSTALL directory prior to running Discover.
In the dialog shown in Figure 2, you can exclude directories and files on any drive. Limiting scans in this manner can cut down on processing time. Using the default exclusions is highly recommended. In most cases, they provide the most reliable scan of the machine. You may not exclude the Windows directory or subdirectories under the Windows directory.
To exclude files and directories:
Running Setup for the Application
After you take the Before snapshot, you should install the application exactly as you want it installed by the Windows Installer. Perform these steps on the same computer that you used to take the Before snapshot.
Taking the After Snapshot
Taking the After Snapshot
Unless you want to examine or customize the Windows Installer package, you are now ready to use this .msi file to install this package on other computers. For instructions on doing so, see the "Step-by-Step Guide to Software Installation and Maintenance."
The following sections describe how to customize the package
Customizing the Windows Installer Package Using VERITAS Software Console
If you have created a Windows Installer package on an appropriate reference computer, you may not want to modify the package at all. If you do want to modify the package, you must open it in the VERITAS Software Console. Only one Windows Installer package can be open inside the VERITAS Software Console at a time. You can use the Windows Installer Package Editor in the VERITAS Software Console to customize the Windows Installer package in a number of ways:
The VERITAS Software Console
There are three main areas in the VERITAS Software Console: Tree View, List View, and Data View. Press F6 to move between each area in a counter-clockwise direction. At the far left of the VERITAS Software Console, a shortcut bar allows you to create shortcuts to the most frequently visited items in the VERITAS Software Console.
Tree View appears in the top left of the VERITAS Software Console. It contains the Windows Installer Package Editor. Click the plus and minus signs, or the names of the items, to expand and collapse them. When you click all the items, you can view a tree of packages, features, and components.
The EditorsWord2000 package now displays under the Windows Installer Package Editor in the Tree View pane.
The right pane in the VERITAS Software Console window is called Data View. Its contents depend on the current selection in the Tree View and List View panes.
Use options from the > View menu to refresh an open view or to open another window.
Click the > Window menu and then click New Window to open another window displaying the same view that you currently have displayed. (You can display both windows variously using the Window menu options to Cascade, Tile Horizontally, etc.).
Change the view in either window to see two aspects of the same selected item. This option allows you to quickly and easily compare the data of different items. For example, if you wanted to see both shortcut information and registry information about a certain component, you could select the same component in the Tree View of each window. In one window, you select the Shortcut option from List View; in the other window you select Registry.
Select > Save on Exit from the Window menu to save your place as you exit. The next time you start the VERITAS Software Console, it displays the window you were previously working in. A check mark next to this option indicates that it is enabled. The Windows Installer Package Editor enables this feature by default.
The pane in the lower left of the VERITAS Software Console is called the List View window. When you highlight a package, a component, or a feature in the Tree View window, the List View window offers various options. The Data View will differ depending upon which of these options is selected.
To hide or display the shortcut bar, click the > View menu and then click Shortcut Bar. The bar will appear on the far left of the VERITAS Software Console. It provides convenience for accessing items you use most frequently, or for items which appear at the bottom of long lists or hierarchies.
Adding Shortcut Bars
Editing a Bar Name
Adding Shortcuts to a Shortcut Bar
You can drag items from the Tree View or List View to the shortcut area. The items appear as icon shortcuts.
Deleting and Editing Shortcuts
Renaming a Shortcut
Navigating the VERITAS Software Console
Various ways of moving around the VERITAS Software Console are listed in Table 1 below..
Table 1 The VERITAS Software Console Interface
When all branches are expanded, you can view the product, with one or more features, each of which will have one or more components. The icons shown in Figure 3 below represent packages, features, and components:
The administrator cannot name components. Their unique identifiers, complex GUIDs (alphanumeric codes), will appear in curly brackets, as illustrated in Figure 4 below:
Adding Administrative Information
You can use the Windows Installer Package Editor to add comments and administrative information about a product, such as names and phone numbers of technical contacts.
To remove a feature, select it, right-click it, and then click Delete.
To remove a component, select it, right-click it, and then click Delete.
Viewing Or Modifying Files
Select the Files option in the List View window to view or modify information about files that are added or removed when the Windows Installer package is installed. Three tabbed pages are available:
On any tabbed page, you can add entries to the list, remove entries, or modify information about entries.
Adding an Entry to the Files List
Select either the Add tab or the Remove tab, depending upon whether the files are to be added or removed when the component is installed. At the top of the Data View tab, you will see the buttons shown in Figure 6 below. The left button is Add. The middle button is Modify. The right button is Remove.
If you have selected a package or a feature, the > Select Component dialog appears.
Modifying Attributes of a File in the List
Note: Occasionally you might receive an error when installing such as this: Error 1904. Module C:\Directory\DirectorySuite8\SomeName.DLL failed to register. HRESULT -2147467259. Contact your support personnel. If you receive this error message, select the file and turn off Auto Register.
Assigning Permissions to the Highlighted File
To view or change access permissions for the selected file, or to add users or groups:
To add permissions to a particular file, click Add (left button) to open the Permissions dialog. (If there are no users or groups in the list, this action causes an ... button to appear in the Domains and Names area. Click it to open the Permissions dialog to add a user.)
To remove permissions, select the entry you want to delete under Domains & Names, and click Remove.
You can also access these dialogs from the registry screen. Right-click a registry entry and click Permissions on the shortcut menu.
To add a user or group:
The User or Group will appear in the Domains amp Names box in the Permissions dialog.
To add or change permissions:
The changes will show up in the > Permissions dialog.
Adding Fonts to a Component
To add a font when a component is installed:
Working With Shortcuts
Use the Shortcuts option in the List View window to view or modify a list of shortcuts that are to be installed when an application is installed. You can add entries to this list, remove entries, or modify information about shortcuts already in the list.
Modifying Information about Shortcuts
To view or change information about shortcuts, select the shortcut, and click Modify. The General tab of the Shortcut dialog appears.
Make any changes. For example, you might want to change where the icon appears to the user. In this case, you would open the list for the Create In field, and select another option.
If you want to add arguments or change the icon the user sees, click the Icon tab, and the Icon dialog appears.
To change the icon the user will see after the Windows Installer package is installed, click Select Icon. The Select Icon dialog appears.
Click the ... button and select the file that holds the icon you want to use. The Icon window shows examples of the icons you can use. Click one of them, and then click OK. Your selection appears in the Current Icon area of the Icon dialog.
Working with the Registry Editor
Use the registry option in the List View window to see a list of registry entries and to indicate what changes are to be made to the registry when the Windows Installer package is installed. Two tabbed pages are available.
Use the Add tab for elements that are to be added to the registry when the component is installed. A pane on the left of this data window shows the registry entries. A pane on the right shows the value, type (such as DWORD or string), and data.
Use the Remove tab for elements that are to be deleted from the registry when the component is installed. A pane on the left of this data window shows the registry entries. A pane on the right shows the value, type (such as DWORD or string), and data.
To change a registry entry, navigate to the desired level, as you would do if using a registry editing tool such as RegEdit. Highlight the entry and right click. Depending on what you have selected, you can add a key or value, rename the highlighted item, or delete it. To see the value of a key, highlight it to select it. The value will appear in the right-hand pane.
Note: If you make a mistake that causes problems when starting your computer, you can restore the registry. Follow the instructions given in Regedit Help for your version of Windows or Windows NT.
Add Value Dialog
Use this dialog to name the value you are entering, and to indicate its data type.
Depending on which data type you choose, clicking OK opens one of the following dialogs:
String Editor Dialog
Use this dialog to enter a Reg_Sz or Reg_Expand_Sz value for the registry. After you click OK, the value appears in the Data View pane. The string that you entered in the String Editor dialog appears in the data column.
Binary Editor Dialog
Use this dialog to enter a binary value for the registry. Click the Binary or Hex option button to view the value in the selected format for editing purposes. After you click OK, the value appears in the Data View pane. The type will be listed as Reg_Binary, but the data will display in hexadecimal form.
Use this dialog to enter a Reg_Multi_Sz value for the registry. Click the Binary, Decimal, or Hex option button to view the value in the selected format for editing purposes. After you click OK, the value appears in the Data View pane. The string that you entered in the MultiString Editor dialog appears in the data column.
DWord Editor Dialog
Use this dialog to enter a DWORD value for the registry. Click the Binary, Decimal, or Hex option button to view the value in the selected format for editing purposes. After you click OK, the value appears in the Data View pane. The string that you entered in the DWord Editor dialog appears in the data column.
Working with Windows 2000 Services to View, Add, or Modify Services
Use the services option in the List View window to view, add, or edit information about Windows 2000 Services. Two tabbed pages are available:
The two tabs are independent of each other. They do not have to contain the same services.
Adding or Modifying Services
To add a service when the user installs the Windows Installer package, click the Add tab, and click Add. To modify general information about a service, select it in the list, and click Modify. Either button opens the Add Service dialog.
Complete the information on the General tabbed page, and click the Options tab to open the Options dialog to set load order, dependencies, and password.
To add a dependency, select either > Group or Service. Then click Add, and make your selection. To remove a dependency, select it, and click Delete. Use the arrow buttons to move a selected item up or down in the list.
To add or modify information about how a service is to be controlled:
To add an argument for the service, type the argument in the Arguments field, and click Add to List. To remove one, select it and click Remove.
Working with INI Files
Use the INI Edits option in the List View window to indicate which INI file(s) should be edited, and how, when a component is installed.
Adding an INI File to the List
To add an INI file to the list of INI files to be edited:
Type or browse for the name of the INI file, and click OK.
Adding Sections and Values
To add a section and value to an INI file when the Windows Installer package is installed:
Do not type the brackets. But when the new section is added to the INI file, it will appear in brackets, as [NewSection].
Removing an INI File
To remove an INI file when the user installs the Windows Installer package:
Removing Sections and/or Values
You can modify a Windows Installer package to remove a section or a value from a named INI file when the package is installed.
To remove a section or a value:
Remember that this action does not add a new section to an INI file. To do that, you must enter information using the Add tab. When you click New Section on the Remove tab, you are simply adding the section to the list of sections to be removed.
Type the value and data that are to be removed when the Windows Installer package runs. Use the option buttons to indicate whether the package is to remove a line or a tag.
The example company, organization, products, people, and events depicted in this step-by-step guide are fictitious. No association with any real company, organization, product, person, or event is intended or should be inferred.
This common infrastructure is designed for use on a private network. The fictitious company name and DNS name used in the common infrastructure are not registered for use on the Internet. Please do not use this name on a public network or Internet.
The Active Directory service structure for this common infrastructure is designed to show how Microsoft Windows 2000 Change and Configuration Management works and functions with the Active Directory. It was not designed as a model for configuring an Active Directory for any organization—for such information see the Active Directory documentation.
This feature information was obtained from the Microsoft Windows 2000 website at http://www.microsoft.com/windows2000 and are linked from ActiveWin.com for your convenience and is subject to Microsoft's copyright. For the most accurate information please visit the official site.