Click to Rate and Give Feedback
MSDN
MSDN Library
Windows Installer
Standard Actions
 InstallValidate Action
InstallValidate Action

The InstallValidate action verifies that all volumes to which cost has been attributed have sufficient space for the installation. The InstallValidate action ends the installation with a fatal error if any volume is short of disk space.

The InstallValidate action also notifies the user if one or more files to be overwritten or removed are currently in use by an active process. For more information, see System Reboots.

Sequence Restrictions

The CostFinalize action and any UI dialog box sequences that allow the user to modify selection states and/or directories should be sequenced before the InstallValidate action.

Custom actions that change the installation state of features or components must be sequenced before the InstallValidate action.

ActionData Messages

There are no ActionData messages.

Remarks

Typically, an earlier UI dialog box sequence should perform the same verification as the InstallValidate action when the user attempts to initiate the copying of files. This UI dialog box sequence should present an Out of Disk Space dialog box if the volumes selected do not have enough space for the installation. The UI dialog boxes should be authored in a way to prevent the user from proceeding with the installation if there is insufficient disk space. In the case of a quiet installation, there is no user interface and the InstallValidate action terminates the installation if there is insufficient disk space. The cause of the premature termination is recorded in the log file if logging is enabled.

An entry is added to an internal FilesInUse table if any file is overwritten or removed while it is open for execution or modification by any process during file costing. The FilesInUse table contains columns for the name and full path of the file. When the InstallValidate action executes, the installer queries the FilesInUse table for entries and determines the name of the process using the file. The InstallValidate action adds one record to the ListBox user interface table for each unique process identified by this query. The record contains the following values in each column:

Property: FileInUseProcessValue: Name of processText: Text contained in the caption of the main window of the process

The InstallValidate action then displays the Files In Use dialog box. This dialog box displays the processes that must be shut down to avoid the requirement of restarting the system to replace files in use.

The InstallValidate action queries the Dialog table for an authored dialog box with the reserved name FilesInUse dialog and displays it. This dialog box must contain a ListBox control that is tied to a property named FileInUseProcess. By convention, this dialog box has an Exit, Retry, or Ignore button, but this is up to the UI author. Each button should be tied to an EndDialog ControlEvent in the ControlEvent table. The InstallValidate action responds as follows to the value returned by the DoAction ControlEvent, 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 msiDoActionStatusSuccess.

Exit: The InstallValidate action immediately returns control to the installer with a status of msiDoActionStatusUserExit. This terminates the installation.

Any other return value: The InstallValidate action immediately returns control to the installer with a status of msiDoActionStatusSuccess. 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 when the system is restarted.

If there is no ListBox table in the database, InstallValidate exits silently without an error.

The semicolon is the list delimiter for transforms, sources, and patches, and should not be used in these file names or paths.

Files marked read-only in a read-only location are never considered in use by the installer.

A default Out of Disk Space dialog box containing Abort and Retry buttons is presented to the user if the user interface level is basic.

Send comments about this topic to Microsoft

Build date: 11/12/2009

Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
Quitting running processes?      chaiguy1337   |   Edit   |   Show History
Could someone please post a method to optionally send a Process.Close() message to any running processes that are required for the installation. I do not like bothering the user with things like this when not absolutely necessary.
Tags What's this?: Add a tag
Flag as ContentBug
FilesInUse      NGH   |   Edit   |   Show History

Would someone help. I saw this in the above text: "The FilesInUse table contains columns for the name and full path of the file."

My Setup.msi deos not have the "FilesInUse" table. What version of Windows Installer should I have?

Currently I am using the the Wise for windows installer (v 3.5), and my problem is:

I have one of the exe, which is one of many exe in my product, running in the minimized mode. When I apply a patch (is it called small update?!), the FilesInUse dialog did not report that exe. But if I run it in the restore or maximize, then the FilesInUse shows it.

What should I do, so the exe always reported in the FilesInUsewhen the it is running?

FileInUse issue of IE8 and XP      mervingmr   |   Edit   |   Show History
Our product is a ActiveX control, which can be embedded in IE. On uninstalling, if there is an IE window which embeds our ActiveX control, the file in use dialog should pop up to tell user to close the IE window, and this works correctly, on IE6, and IE7 in XP, but not IE8. If a IE8 window embeds our ActiveX control, the file in use dialog will not pop up.
We used the action InstallValidate to do this task. In the uninstalling log file, I found the following lines,
MSI (s) (44:28) [15:42:24:203]: 1 application(s) had been reported to have files in use.
Info 1603.The following applications should be closed before continuing the installation.
MSI (s) (44:28) [15:42:24:203]: Note: 1: 2727 2:
MSI (c) (FC:30) [15:42:24:203]: File In Use: -iexplore- Window could not be found. Process ID: 1452
MSI (c) (FC:30) [15:42:24:203]: No window with title could be found for FilesInUse
But the IE8 window was there, it's very weird, it can't be detected by the installer server. MSDN says, if the process holding those files is one that doesn't have a window with a title associated with it, the fileinuse dialog doesn't display.
I suspect that this would be a defect of XP, becasue this issue is not reproducable on Vista. We really want our installer to work as well as on IE6 or IE7.
Is there anyone who experienced this issue?
Flag as ContentBug
Processing
© 2009 Microsoft Corporation. All rights reserved. Terms of Use | Trademarks | Privacy Statement
Page view tracker