Some common problems and what to do about them


The purpose of this section is to list a few of the problems many developers seem to encounter when using Windows Installer, and to suggest a solution. Some of the problems listed here have already been mentioned earlier in the chapter. They are included here in order to make this section a stand-alone reference to common problems.

Another version of this product is already installed

Problem

One of the most common, if not the most common, problem VFP developers run into when first using Windows Installer is the dreaded ‚“Another version of this product is already installed ‚½ error message. This problem is usually encountered by an end user who is attempting to install an update to a previously installed product. The full text of this error message is shown in Figure 20 .


Figure 20. The dreaded ‚“Another version of this product is already installed ‚½ error message.

Cause

The problem occurs when you attempt to install a product using an MSI file whose product code and upgrade code match those of a product already installed on the same computer, and the setup package is not configured to either reinstall or uninstall the existing product.

Solution

There are three different solutions to this problem. All of them assume the new setup package is supposed to be an update to a previously installed version of the same product.

  • Obtain a corrected update package from the developer.

  • Uninstall the previous version of the product, and then install the new version.

  • Run MSIEXEC using REINSTALLMODE=vomus and REINSTALL=ALL. (Refer to the section on the ‚“MSIEXEC command line interface ‚½ for more information.)

The feature you are trying to use is unavailable

Problem

You attempt to Modify, Repair, or Remove an installed product and you get an error message telling you the ‚“feature you are trying to use is unavailable. ‚½ You are prompted to provide the location of the MSI file for this product.

Examples of this error are shown in Figure 21 and Figure 22 . The difference between the two has to do with the source of the original setup package.


Figure 21. This wording of ‚“The feature you are trying to use is unavailable ‚½ message is displayed when the source was a CD or other removable media.

Figure 22. This wording of ‚“The feature you are trying to use is unavailable ‚½ message is displayed when the source was a local or network folder.

If you are unable to provide access to the MSI file for this product and click the Cancel button in the dialog in Figure 21 or Figure 22, setup terminates with the message show in Figure 23 and you are unable to go any further.


Figure 23. If Windows Installer can ‚ t find the installation source and you can ‚ t provide access to it, the result is this error message.

Cause

This error occurs if you attempt to modify, repair, or remove a product and Windows Installer cannot locate, or cannot access, either the cached copy of the MSI file or the original installation source. One possible cause of this error is deleting the cached copy of the MSI file from the local computer. If Windows Installer cannot locate the cached copy of the MSI file, it attempts to locate the original source. If the original source is also unavailable, this error condition results. This error is particularly frustrating if you are trying to uninstall a product, because the uninstall will fail.

Note ‚  

We have seen situations where a new version of a product could not be installed due to the ‚“another version of this product is already installed ‚½ error, yet the existing version could not be uninstalled due to the ‚“feature unavailable ‚½ error. A classic Catch-22!

Windows Installer attempts to hide the cached MSI files from the end user in order to protect them from being inadvertently or deliberately modified or removed. A determined user, however, can still find and delete them, perhaps in an attempt to free up space on their hard drive. With earlier versions of Windows Installer, at least under Windows 98, we observed situations where the cached copy of an MSI file was placed in the Windows\Temp folder. Many people routinely clean out this folder under the assumption the files it contains are in fact temporary and therefore unnecessary. Deleting the MSI and MSP files, of course, triggers this error later on. Windows Installer 2.0 places cached MSI files in the hidden folder {Windows}\Installer, so this problem may occur less frequently now than before.

Solution

There are several possible solutions to this problem.

  • Restore the cached copy of the MSI file to its original location, or make it possible for Windows Installer to access it in its current location.

  • Make the original installation source available, and point to it in the dialog window shown in Figures 21 and 22.

  • Reinstall the product from the original source using REINSTALLMODE=vomus and REINSTALL=ALL. This creates a new copy of the cached MSI file.

  • If all else fails, run MSICLEAN to erase all traces of the setup from the computer. Then reinstall the product from the original source. The MSICLEAN utility is described later in this chapter.

I want my application to be available to all users

Problem

You want your product to be available to all users of a computer, but after installation you find it is available only to the user who installed it.

Cause

On Windows NT, Windows 2000, and Windows XP, an application can be installed for either a single user or for all users of the computer. Correspondingly, Windows Installer can be configured to perform an installation on either a per-user or a per-machine basis. This problem occurs if an installation was performed on a per-user basis when in fact a per-machine basis was desired.

Solution

The solution to this problem depends on whether it was caused by the way the setup package was configured, or by a choice the user made during installation. If the Customer Information dialog is present in the setup, the user is able to choose whether to install the product for all users (a ‚“per-machine ‚½ installation) or only for themselves (a ‚“per-user ‚½ installation). Internally, the type of installation is governed by the value of the ALLUSERS property in the MSI database. The default value of this property is established by the setup developer in conjunction with the setup tool being used. For setups created by InstallShield Express, the initial value of ALLUSERS is found in the ISInitAllUsers row of the CustomAction table in the MSI database. Refer to ‚“How do I specify a per-user or per-machine installation? ‚½ in the Windows Installer Help file for more information about the ALLUSERS property.

  • If the setup package was configured as a per-user installation, reconfigure and redistribute it as a per-machine installation. The mechanics of doing this depend on the setup tool you are using. Look for references to ‚“per-user, ‚½ ‚“per-machine, ‚½ and the ALLUSERS property in the tool ‚ s Help file. Note that per-machine setups require administrative privileges.

  • If the setup package was configured to give the user a choice during installation, and the user chose to install the product ‚“only for the current user, ‚½ have them uninstall it, and then reinstall it ‚“for all users of this computer. ‚½ Again, note that this choice requires administrative privileges.

The Windows Installer Clean Up Utility

Sometimes you may encounter situations where no matter what you do you cannot seem to make a Windows Installer problem go away. Because of the numerous registry entries created when a Windows Installer setup package is run, you cannot simply delete files to undo a problematic installation.

Fortunately, Microsoft has provided a tool to help out in situations like this. The Windows Installer Clean Up Utility can be used to delete all registry entries relating to a particular Windows Installer setup package. Following clean up of the registry, it is presumably safe to remove the files installed by the setup, and/or to reinstall the product from its original source. Using the utility is clearly a drastic step, but it may be a good choice ‚ or perhaps your only choice ‚ as a solution of last resort.

Microsoft knowledge base article 238413 has a full description of the Windows Installer Clean Up Utility plus links to download it. Note that there are two versions of this utility, one for Windows 95, Windows 98, and Windows Me and the other for Windows NT and Windows 2000. This utility comes with a strong caveat concerning its use, and is provided by Microsoft on as ‚“as is ‚½ basis; we interpret that to mean ‚“use at your own risk. ‚½




Deploying Visual FoxPro Solutions
Deploying Visual FoxPro Solutions
ISBN: 1930919328
EAN: 2147483647
Year: 2004
Pages: 232

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net