[This is preliminary documentation and subject to change.]
The InstallValidate action verifies that all volumes to which cost has been attributed have sufficient space for the installation. If any volume is short of disk space, the InstallValidate action ends the installation with a fatal error.
This action is also responsible for notifying the user if one or more files to be overwritten or removed are currently in use by an active process.
None
None
The CostFinalize action and any user-interface dialog sequences that allow the user to modify selection states and/or directories should be executed prior to executing InstallValidate.
This is a fail-safe verification. Typically, an earlier user-interface dialog sequence should perform this same verification whenever the user attempts to initiate the actual installation of files and should present an Out-Of-Disk-Space dialog when required. Thus, the user-interface dialogs should be authored in such a way as to prevent the user from proceeding with the install if a disk-space problem exists. Of course, in the case of a quiet install, there is no user interface, so the fact that InstallValidate action simply terminates the install if a disk-space problem exists is the proper response. (If logging is enabled, the reason for the premature termination appears in the log.)
Handling Files in Use
During the file costing process, for any file to be overwritten or removed that is also found to be in use (that is, opened for execution or modification by any process), an entry is added to an internal FilesInUse table. (This entry contains columns for the name and full path of the file.) When InstallValidate is executed, if there are any entries in the FilesInUse table, The installer determines the name of the process that is using the file. For each unique process identified in this manner, InstallValidate adds one record to the ListBox user-interface table, with the following values in each column:
Property: FileInUseProcess
Value: <Name of process>
Text: <Text contained in the caption of main window of process>
Next, InstallValidate displays the FilesInUse dialog. This gives the user interface a chance to display a dialog informing the user of the processes that should be shut down to avoid the requirement of rebooting the system to replace files in use. To display an appropriate dialog, a dialog must be authored with the name FilesInUse. This dialog must contain a ListBox control that is tied to a property named FileInUseProcess. By convention, this dialog would have three pushbuttons (for example, Exit, Retry, Ignore), but this is up to the user-interface author. In any case, each pushbutton should be tied to an EndDialog controlevent via the ControlEvent table, each with a different argument. InstallValidate responds as follows to the value returned by DoAction, as dictated by one of these EndDialog arguments associated with the button pushed by the user:
Retry: All values added to the ListBox table are cleared, and the entire file costing procedure is repeated (rechecking for files that are still in use). If one or more processes are still identified as using files to be overwritten or deleted, the process repeats; otherwise, InstallValidate returns control to The installer with a status of iesSuccess.
Exit: InstallValidate immediately returns control to the installer with a status of iesUserExit. This terminates the installation.
Any other return value: InstallValidate immediately returns control to the installer with a status of iesSuccess. In this case, since one or more files are still in use, the subsequent InstallFiles and/or InstallAdminPackage actions must schedule the in-use file(s) to be replaced or deleted at reboot time.
Notes If no dialog named FilesInUse is found, or if the database has no ListBox table, InstallValidate silently exits without an error.
Since the list delimiter for transforms, sources and patches is a semicolon, this character should not be used in these filenames or paths.
Files marked read-only in a read-only location are never considered in use by the installer.
If the UI level is basic, an "out of disk space" dialog is always presented to the user, when selecting the "Abort" and "Retry" buttons. To determine if sufficient disk space is available, see CheckDiskSpace ControlEvent.