< Day Day Up > |
TechniqueYou can set launch conditions ”conditions that must be satisfied or the setup program aborts the entire install ”using the Launch Conditions Editor (see Figure 20.12), which you can find under View, Editor. Figure 20.12. The Launch Conditions Editor.
VS.NET automatically adds the condition that the .NET Framework must be installed when it creates the project, and you can add further conditions. Right-clicking on the Search Target Machine node allows you to add a search of the target computer. You can specify files, Registry keys, or names of applications installed by Windows Installer that must be present on the target machine before the setup program proceeds. Right-clicking on the Launch Conditions node allows you to add launch conditions that are based on information known to Windows Installer. You can set the details of the conditions by setting values in the Properties Window for each condition. Figure 20.13 shows a launch condition that only allows setup to proceed if the computer is running Windows 2000 or later. Figure 20.13. Restricting installations to machines running Windows 2000 or later.
The Message property is the error message that gets displayed if the launch condition fails. The Condition itself comes from a list of properties that are not part of .NET but are defined within the Windows Installer itself. VersionNT is a Windows Installer property that has the value 400 on machines running NT4, 500 for Windows 2000, and so on. This property is not available on machines running Windows 9x (which means that any test for this property having any value will fail). The full list of available Windows Installer properties is too long to present here; however, you can find the list at http://msdn.microsoft.com/library/default.asp?url=/library/en-us/msi/setup/versionnt_property.asp. Note that as new versions of Windows Installer are released, the list of properties is likely to grow further. Table 20.1 presents a few of the more significant properties. Table 20.1. Some Useful Windows Installer Properties
|
< Day Day Up > |